Changeset 846 for trunk/src/3rdparty/webkit/WebKit
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 20 deleted
- 62 edited
- 61 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/webkit/WebKit/ChangeLog
r561 r846 1 2010-06-18 Alexis Menard <alexis.menard@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 [qt] Better check for the declarative plugin inclusion. 6 7 * WebKit.pro: 8 9 2010-03-22 Kevin Decker <kdecker@apple.com> 10 11 Reviewed by Simon Fraser. 12 13 https://bugs.webkit.org/show_bug.cgi?id=36328 14 15 * WebKit.xcodeproj/project.pbxproj: Remove WebNullPluginView and nullplugin.tiff from the project. 16 17 2010-03-22 Darin Adler <darin@apple.com> 18 19 * StringsNotToBeLocalized.txt: Updated for recent changes. 20 21 2010-03-22 Kevin Decker <kdecker@apple.com> 22 23 Reviewed by John Sullivan. 24 25 https://bugs.webkit.org/show_bug.cgi?id=36328 26 27 * English.lproj/Localizable.strings: Added "Missing Plug-in" string. 28 29 2010-03-18 Leandro Pereira <leandro@profusion.mobi> 30 31 Reviewed by Kenneth Rohde Christiansen. 32 33 Add EFL port files to efl/ewk. 34 http://webkit.org/b/35931 35 36 * efl/ewk/ewk_settings.cpp: Added. 37 * efl/ewk/ewk_settings.h: Added. 38 39 2010-03-17 Leandro Pereira <leandro@profusion.mobi> 40 41 Reviewed by Kenneth Rohde Christiansen. 42 43 Add default theme files to efl/DefaultTheme. 44 http://webkit.org/b/36240 45 46 * efl/DefaultTheme/widget/radio/img_radio_on.png: Added. 47 * efl/DefaultTheme/radio/img_radio_off_hover.png: Added. 48 * efl/DefaultTheme/radio/img_radio_on_hover.png: Added. 49 * efl/DefaultTheme/radio/img_radio_off.png: Added. 50 * efl/DefaultTheme/radio/img_radio_off_focus.png: Added. 51 * efl/DefaultTheme/radio/img_radio_on_focus.png: Added. 52 * efl/DefaultTheme/combo/combo_normal.png: Added. 53 * efl/DefaultTheme/combo/combo_focus_button.png: Added. 54 * efl/DefaultTheme/combo/combo_hover_button.png: Added. 55 * efl/DefaultTheme/combo/combo_hover.png: Added. 56 * efl/DefaultTheme/combo/combo_focus.png: Added. 57 * efl/DefaultTheme/combo/combo_press_button.png: Added. 58 * efl/DefaultTheme/combo/combo_normal_button.png: Added. 59 * efl/DefaultTheme/combo/combo_press.png: Added. 60 * efl/DefaultTheme/combo/icon.png: Added. 61 * efl/DefaultTheme/file/file_normal.png: Added. 62 * efl/DefaultTheme/file/file_press.png: Added. 63 * efl/DefaultTheme/file/file_hover.png: Added. 64 * efl/DefaultTheme/file/file_focus.png: Added. 65 * efl/DefaultTheme/search/cancel/cancel_normal_button.png: Added. 66 * efl/DefaultTheme/search/cancel/cancel_normal_button2.png: Added. 67 * efl/DefaultTheme/search/decoration/decoration_normal_button.png: Added. 68 * efl/DefaultTheme/search/field/field_focused.png: Added. 69 * efl/DefaultTheme/search/field/field_normal.png: Added. 70 * efl/DefaultTheme/search/field/field_hovered.png: Added. 71 * efl/DefaultTheme/entry/img_normal.png: Added. 72 * efl/DefaultTheme/entry/img_hovered.png: Added. 73 * efl/DefaultTheme/entry/img_focused.png: Added. 74 * efl/DefaultTheme/check/img_check_off_hover.png: Added. 75 * efl/DefaultTheme/check/img_check_on.png: Added. 76 * efl/DefaultTheme/check/img_check_off_focus.png: Added. 77 * efl/DefaultTheme/check/img_check_on_focus.png: Added. 78 * efl/DefaultTheme/check/img_check_off.png: Added. 79 * efl/DefaultTheme/check/img_check_on_hover.png: Added. 80 * efl/DefaultTheme/scrollbar/scrollbar_knob_h.png: Added. 81 * efl/DefaultTheme/scrollbar/scrollbar_knob_v.png: Added. 82 * efl/DefaultTheme/scrollbar/scrollbar_hilight.png: Added. 83 * efl/DefaultTheme/scrollbar/scrollbar_v.png: Added. 84 * efl/DefaultTheme/scrollbar/scrollbar_h.png: Added. 85 * efl/DefaultTheme/button/img_button_normal.png: Added. 86 * efl/DefaultTheme/button/img_button_focus.png: Added. 87 * efl/DefaultTheme/button/img_button_hover.png: Added. 88 * efl/DefaultTheme/button/img_button_press.png: Added. 89 90 2010-03-17 Leandro Pereira <leandro@profusion.mobi> 91 92 Reviewed by Kenneth Rohde Christiansen. 93 94 Add EFL example browser to efl/EWebLauncher. 95 http://webkit.org/b/36176 96 97 * efl/EWebLauncher/main.c: Added. 98 99 2010-03-16 Leandro Pereira <leandro@profusion.mobi> 100 101 Reviewed by Kenneth Rohde Christiansen. 102 103 Add EFL port files to efl/WebCoreSupport. 104 http://webkit.org/b/35916 105 106 * efl/WebCoreSupport/ContextMenuClientEfl.cpp: Added. 107 * efl/WebCoreSupport/ContextMenuClientEfl.h: Added. 108 109 2010-03-16 Yury Semikhatsky <yurys@chromium.org> 110 111 Reviewed by Pavel Feldman. 112 113 Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. 114 115 Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder 116 https://bugs.webkit.org/show_bug.cgi?id=35036 117 118 * efl/WebCoreSupport/InspectorClientEfl.cpp: 119 (WebCore::InspectorClientEfl::openInspectorFrontend): 120 * efl/WebCoreSupport/InspectorClientEfl.h: 121 122 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 123 124 Reviewed by Kenneth Rohde Christiansen. 125 126 Add EFL port files to efl/ewk. 127 http://webkit.org/b/35925 128 129 * efl/ewk/ewk_history.cpp: Added. 130 * efl/ewk/ewk_history.h: Added. 131 132 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 133 134 Reviewed by Kenneth Rohde Christiansen. 135 136 Add EFL port files to efl/ewk. 137 http://webkit.org/b/35928 138 139 * efl/ewk/ewk_main.cpp: Added. 140 * efl/ewk/ewk_main.h: Added. 141 142 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 143 144 Reviewed by Kenneth Rohde Christiansen. 145 146 Add EFL port files to efl/ewk. 147 http://webkit.org/b/35924 148 149 * efl/ewk/ewk_frame.cpp: Added. 150 * efl/ewk/ewk_frame.h: Added. 151 152 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 153 154 Reviewed by Kenneth Rohde Christiansen. 155 156 Add EFL port files to efl/ewk. 157 http://webkit.org/b/35936 158 159 * efl/ewk/ewk_view_single.c: Added. 160 161 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 162 163 Reviewed by Kenneth Rohde Christiansen. 164 165 Add EFL port files to efl/ewk. 166 http://webkit.org/b/35929 167 168 * efl/ewk/ewk_util.cpp: Added. 169 * efl/ewk/ewk_util.h: Added. 170 171 2010-03-13 Leandro Pereira <leandro@profusion.mobi> 172 173 Reviewed by Kenneth Rohde Christiansen. 174 175 Add EFL port files to efl/ewk. 176 http://webkit.org/b/35934 177 178 * efl/ewk/EWebKit.h: Added. 179 * efl/ewk/ewk_eapi.h: Added. 180 * efl/ewk/ewk_logging.h: Added. 181 * efl/ewk/ewk_private.h: Added. 182 183 2010-03-11 Leandro Pereira <leandro@profusion.mobi> 184 185 Reviewed by Gustavo Noronha Silva. 186 187 Add EFL port files to efl/WebCoreSupport. 188 http://webkit.org/b/35917 189 190 * efl/WebCoreSupport/InspectorClientEfl.h: Added. 191 * efl/WebCoreSupport/InspectorClientEfl.cpp: Added. 192 193 2010-03-11 Leandro Pereira <leandro@profusion.mobi> 194 195 Reviewed by Gustavo Noronha Silva. 196 197 Add EFL port files to efl/WebCoreSupport. 198 http://webkit.org/b/35914 199 200 * efl/WebCoreSupport/DragClientEfl.h: Added. 201 * efl/WebCoreSupport/DragClientEfl.cpp: Added. 202 203 2010-03-11 Simon Fraser <simon.fraser@apple.com> 204 205 Reviewed by Mark Rowe. 206 207 Sort the project file. 208 209 * WebKit.xcodeproj/project.pbxproj: 210 211 2010-03-10 Leandro Pereira <leandro@profusion.mobi> 212 213 Reviewed by Holger Freyther. 214 215 Add EFL port files to efl/WebCoreSupport. 216 http://webkit.org/b/35913 217 218 * efl/WebCoreSupport/ChromeClientEfl.cpp: Added. 219 * efl/WebCoreSupport/ChromeClientEfl.h: Added. 220 221 2010-03-09 John Sullivan <sullivan@apple.com> 222 223 Fixed localized string key collision. update-webkit-localized-strings now 224 runs without errors. 225 226 Reviewed by Adam Roben. 227 228 * English.lproj/Localizable.strings: 229 Regenerated. 230 231 2010-03-09 John Sullivan <sullivan@apple.com> 232 233 * StringsNotToBeLocalized.txt: 234 Brought this file up to date. update-webkit-localizable-strings still lists 235 one key collision, but that's a separate issue. 236 237 2010-03-04 Mark Rowe <mrowe@apple.com> 238 239 Reviewed by Sam Weinig. 240 241 Add a script to verify that WebKit framework headers are internally consistent. 242 243 * WebKit.xcodeproj/project.pbxproj: Run the script during the build and fail with 244 an error should the consistency check fail. 245 246 2010-02-25 Alexey Proskuryakov <ap@apple.com> 247 248 Reviewed by Geoffrey Garen. 249 250 https://bugs.webkit.org/show_bug.cgi?id=35394 251 <rdar://problem/7685262> Make passing objects between Java and plug-ins work 252 253 * WebKit.xcodeproj/project.pbxproj: Added new files. 254 255 2010-02-04 Mark Rowe <mrowe@apple.com> 256 257 Reviewed by Timothy Hatcher. 258 259 Build fix. Remove a symbol corresponding to an inline function from the linker export 260 file to prevent a weak external failure. 261 262 * WebKit.xcodeproj/project.pbxproj: Accommodate rename of script. 263 264 2010-02-04 John Sullivan <sullivan@apple.com> 265 266 https://bugs.webkit.org/show_bug.cgi?id=34611 267 WebLocalizedString() could use an assertion that it is being called on the main thread 268 269 Reviewed by Tim Hatcher. 270 271 * WebKit.xcodeproj/project.pbxproj: 272 Updated for renamed file (WebLocalizableStrings.m -> WebLocalizableStrings.mm) 273 274 2010-01-29 Mark Rowe <mrowe@apple.com> 275 276 Sort Xcode projects. 277 278 * WebKit.xcodeproj/project.pbxproj: 279 280 2010-01-19 Dan Bernstein <mitz@apple.com> 281 282 Redo DumpRenderTree build fix without making WebTypesInternal.h a private header 283 284 * WebKit.xcodeproj/project.pbxproj: 285 286 2010-01-19 Simon Fraser <simon.fraser@apple.com> 287 288 Build fix, no review. 289 290 Fix build of DumpRenderTree by making the header WebTypesInternal.h Private 291 in WebKit. 292 293 * WebKit.xcodeproj/project.pbxproj: 294 295 2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> 296 297 MSAA: The child <option> elements of a non-multiple <select> are not 298 exposed 299 300 https://bugs.webkit.org/show_bug.cgi?id=33773 301 <rdar://problem/7550556> 302 303 Reviewed by Alice Liu. 304 305 * English.lproj/Localizable.strings: 306 Add new localized strings. 307 308 2010-01-13 Kevin Decker <kdecker@apple.com> 309 310 Reviewed by Mark Rowe. 311 312 https://bugs.webkit.org/show_bug.cgi?id=33610 313 <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard. 314 315 * WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL. 316 317 2009-12-25 Darin Adler <darin@apple.com> 318 319 * StringsNotToBeLocalized.txt: Updated for recent changes. 320 321 2009-12-18 Dan Bernstein <mitz@apple.com> 322 323 Updated localizable strings after r52368 324 325 * English.lproj/Localizable.strings: 326 327 2009-12-18 Sam Weinig <sam@webkit.org> 328 329 Reviewed by Dan Bernstein. 330 331 Add Mac WebKit side of the client based geolocation provider. 332 333 * WebKit.xcodeproj/project.pbxproj: 334 335 2009-12-16 Mark Rowe <mrowe@apple.com> 336 337 Build fix. Disable debug variants of WebKit frameworks. 338 339 * WebKit.xcodeproj/project.pbxproj: 340 341 2009-12-16 John Sullivan <sullivan@apple.com> 342 343 Brought this file up to date, sans review. 344 345 * StringsNotToBeLocalized.txt: 346 347 2009-11-30 Mark Rowe <mrowe@apple.com> 348 349 Use the correct path to Info.plist to avoid creating an empty file at the top of the WebKit directory. 350 351 * WebKit.xcodeproj/project.pbxproj: 352 353 2009-11-24 Dmitry Titov <dimich@chromium.org> 354 355 Reviewed by Eric Seidel. 356 357 Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit 358 https://bugs.webkit.org/show_bug.cgi?id=31444 359 360 * chromium/features.gypi: 361 362 2009-11-24 Mark Rowe <mrowe@apple.com> 363 364 Fix production builds where the source tree may be read-only. 365 366 * WebKit.xcodeproj/project.pbxproj: 367 368 2009-11-20 Dave Hyatt <hyatt@apple.com> 369 370 Reviewed by Oliver Hunt and Jon Honeycutt. 371 372 Add support for WebSerializedJSValue to WebKit. This object wraps the SerializedScriptValue functionality in WebCore 373 and exposes the ability to do JS value serialization/deserialization to WebKit clients. 374 375 * WebKit.xcodeproj/project.pbxproj: 376 377 2009-11-20 Chris Fleizach <cfleizach@apple.com> 378 379 Reviewed by Beth Dakin. 380 381 WAI-ARIA: add support for 'math' role 382 https://bugs.webkit.org/show_bug.cgi?id=31706 383 384 * English.lproj/Localizable.strings: 385 * StringsNotToBeLocalized.txt: 386 387 2009-11-19 Eric Carlson <eric.carlson@apple.com> 388 389 Reviewed by Dan Bernstein. 390 391 <rdar://problem/7035231> 392 Support closed caption in <video> element 393 394 * English.lproj/Localizable.strings: 395 Add strings for toggle captions button. 396 397 2009-11-18 Michelangelo De Simone <micdesim@gmail.com> 398 399 Reviewed by Darin Adler. 400 401 Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>. 402 Support for validationMessage attribute, as per HTML5 specs. 403 404 * English.lproj/Localizable.strings: new localizable strings 405 406 2009-11-18 Sam Weinig <sam@webkit.org> 407 408 Reviewed by Anders Carlsson. 409 410 Make the Mac Geolocation API async. 411 412 * WebKit.xcodeproj/project.pbxproj: Remove WebGeolocation. 413 414 2009-11-13 Adam Roben <aroben@apple.com> 415 416 Add WebFrameLoadDelegatePrivat.h to WebKit.xcodeproj 417 418 Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when 419 window objects in isolated worlds are cleared 420 421 Reviewed by Dave Hyatt. 422 423 * WebKit.xcodeproj/project.pbxproj: Added 424 WebFrameLoadDelegatePrivate.h, which already existed. 425 426 2009-11-12 Adam Roben <aroben@apple.com> 427 428 Replace worldIDs with world objects 429 430 Part of <http://webkit.org/b/31414> Implement new SPI for dealing with 431 user scripts/stylesheets and isolated worlds 432 433 Reviewed by Sam Weinig. 434 435 * WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project. 436 437 2009-11-12 Chris Fleizach <cfleizach@apple.com> 438 439 Reviewed by Darin Adler. 440 441 ARIA: add alert type roles 442 https://bugs.webkit.org/show_bug.cgi?id=31392 443 444 * English.lproj/Localizable.strings: 445 * StringsNotToBeLocalized.txt: 446 447 2009-11-02 Eric Carlson <eric.carlson@apple.com> 448 449 Reviewed by John Sullivan and Mark Rowe. 450 451 <rdar://problem/7356733> Voiceover does not read correct media controller time values 452 453 Fix localized strings for media controller time values. 454 455 * English.lproj/Localizable.strings: 456 457 2009-11-02 Chris Fleizach <cfleizach@apple.com> 458 459 Reviewed by Beth Dakin. 460 461 Support ARIA "tab" roles 462 https://bugs.webkit.org/show_bug.cgi?id=30842 463 464 Add a localizable string for tab panel. 465 466 * English.lproj/Localizable.strings: 467 * StringsNotToBeLocalized.txt: 468 1 469 2009-10-27 Dan Bernstein <mitz@apple.com> 2 470 -
trunk/src/3rdparty/webkit/WebKit/mac/Configurations/Version.xcconfig
r561 r846 22 22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 23 24 MAJOR_VERSION = 53 2;25 MINOR_VERSION = 4;24 MAJOR_VERSION = 533; 25 MINOR_VERSION = 3; 26 26 TINY_VERSION = 0; 27 27 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); … … 32 32 33 33 // The system version prefix is based on the current system version. 34 SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$( MAC_OS_X_VERSION_MAJOR));34 SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 35 35 SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR. 36 36 SYSTEM_VERSION_PREFIX_1040 = 4; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
r769 r846 23 23 24 24 #include "qwebframe.h" 25 #include "qwebframe_p.h" 25 26 #include "qwebpage.h" 26 27 #include "qwebpage_p.h" 27 28 #include "QWebPageClient.h" 28 #include <QtGui/QGraphicsScene> 29 #include <QtGui/QGraphicsView> 29 #include "FrameView.h" 30 #include "GraphicsContext.h" 31 #include "IntRect.h" 32 #include "TiledBackingStore.h" 33 #include <QtCore/qmetaobject.h> 34 #include <QtCore/qsharedpointer.h> 35 #include <QtCore/qtimer.h> 30 36 #include <QtGui/qapplication.h> 37 #include <QtGui/qgraphicsscene.h> 31 38 #include <QtGui/qgraphicssceneevent.h> 39 #include <QtGui/qgraphicsview.h> 40 #include <QtGui/qpixmapcache.h> 41 #include <QtGui/qscrollbar.h> 32 42 #include <QtGui/qstyleoption.h> 33 43 #include <QtGui/qinputcontext.h> … … 35 45 #include <QX11Info> 36 46 #endif 47 #include <Settings.h> 48 49 // the overlay is here for one reason only: to have the scroll-bars and other 50 // extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers 51 class QGraphicsWebViewOverlay : public QGraphicsItem { 52 public: 53 QGraphicsWebViewOverlay(QGraphicsWebView* view) 54 :QGraphicsItem(view) 55 , q(view) 56 { 57 setPos(0, 0); 58 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 59 setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); 60 #endif 61 setCacheMode(QGraphicsItem::DeviceCoordinateCache); 62 } 63 64 QRectF boundingRect() const 65 { 66 return q->boundingRect(); 67 } 68 69 void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*) 70 { 71 q->page()->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect()); 72 } 73 74 friend class QGraphicsWebView; 75 QGraphicsWebView* q; 76 }; 37 77 38 78 class QGraphicsWebViewPrivate : public QWebPageClient { … … 41 81 : q(parent) 42 82 , page(0) 43 {} 83 , resizesToContents(false) 84 #if USE(ACCELERATED_COMPOSITING) 85 , shouldSync(false) 86 #endif 87 { 88 #if USE(ACCELERATED_COMPOSITING) 89 // the overlay and stays alive for the lifetime of 90 // this QGraphicsWebView as the scrollbars are needed when there's no compositing 91 q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption); 92 syncMetaMethod = q->metaObject()->method(q->metaObject()->indexOfMethod("syncLayers()")); 93 #endif 94 } 44 95 45 96 virtual ~QGraphicsWebViewPrivate(); 97 46 98 virtual void scroll(int dx, int dy, const QRect&); 47 99 virtual void update(const QRect& dirtyRect); … … 60 112 virtual int screenNumber() const; 61 113 virtual QWidget* ownerWidget() const; 114 virtual QRect geometryRelativeToOwnerWidget() const; 62 115 63 116 virtual QObject* pluginParent() const; 64 117 118 virtual QStyle* style() const; 119 120 virtual bool viewResizesToContentsEnabled() const { return resizesToContents; } 121 122 #if USE(ACCELERATED_COMPOSITING) 123 virtual void setRootGraphicsLayer(QGraphicsItem* layer); 124 virtual void markForSync(bool scheduleSync); 125 void updateCompositingScrollPosition(); 126 127 // QGraphicsWebView can render composited layers 128 virtual bool allowsAcceleratedCompositing() const { return true; } 129 #endif 130 131 void updateResizesToContentsForPage(); 132 virtual QRectF graphicsItemVisibleRect() const; 133 #if ENABLE(TILED_BACKING_STORE) 134 void updateTiledBackingStoreScale(); 135 #endif 136 137 void createOrDeleteOverlay(); 138 139 void syncLayers(); 140 141 void unsetPageIfExists(); 142 65 143 void _q_doLoadFinished(bool success); 144 void _q_contentsSizeChanged(const QSize&); 145 void _q_scaleChanged(); 66 146 67 147 void _q_updateMicroFocus(); … … 70 150 QGraphicsWebView* q; 71 151 QWebPage* page; 152 153 bool resizesToContents; 154 155 // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached 156 QSharedPointer<QGraphicsWebViewOverlay> overlay; 157 158 // we need to put the root graphics layer behind the overlay (which contains the scrollbar) 159 enum { RootGraphicsLayerZValue, OverlayZValue }; 160 161 #if USE(ACCELERATED_COMPOSITING) 162 QWeakPointer<QGraphicsObject> rootGraphicsLayer; 163 // we need to sync the layers if we get a special call from the WebCore 164 // compositor telling us to do so. We'll get that call from ChromeClientQt 165 bool shouldSync; 166 167 // we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue 168 QMetaMethod syncMetaMethod; 169 #endif 72 170 }; 73 171 74 172 QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() 75 173 { 174 #if USE(ACCELERATED_COMPOSITING) 175 if (!rootGraphicsLayer) 176 return; 177 // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp. 178 rootGraphicsLayer.data()->setParentItem(0); 179 q->scene()->removeItem(rootGraphicsLayer.data()); 180 #endif 181 } 182 183 void QGraphicsWebViewPrivate::createOrDeleteOverlay() 184 { 185 bool useOverlay = false; 186 if (!resizesToContents) { 187 #if USE(ACCELERATED_COMPOSITING) 188 useOverlay = useOverlay || rootGraphicsLayer; 189 #endif 190 #if ENABLE(TILED_BACKING_STORE) 191 useOverlay = useOverlay || QWebFramePrivate::core(q->page()->mainFrame())->tiledBackingStore(); 192 #endif 193 } 194 if (useOverlay == !!overlay) 195 return; 196 if (useOverlay) { 197 overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q)); 198 overlay->setZValue(OverlayZValue); 199 } else 200 overlay.clear(); 201 } 202 203 #if USE(ACCELERATED_COMPOSITING) 204 void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) 205 { 206 if (rootGraphicsLayer) { 207 rootGraphicsLayer.data()->setParentItem(0); 208 q->scene()->removeItem(rootGraphicsLayer.data()); 209 QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); 210 } 211 212 rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0; 213 214 if (layer) { 215 layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); 216 layer->setParentItem(q); 217 layer->setZValue(RootGraphicsLayerZValue); 218 updateCompositingScrollPosition(); 219 } 220 createOrDeleteOverlay(); 221 } 222 223 void QGraphicsWebViewPrivate::markForSync(bool scheduleSync) 224 { 225 shouldSync = true; 226 if (scheduleSync) 227 syncMetaMethod.invoke(q, Qt::QueuedConnection); 228 } 229 230 void QGraphicsWebViewPrivate::updateCompositingScrollPosition() 231 { 232 if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) { 233 const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition(); 234 rootGraphicsLayer.data()->setPos(-scrollPosition); 235 } 236 } 237 #endif 238 239 void QGraphicsWebViewPrivate::syncLayers() 240 { 241 #if USE(ACCELERATED_COMPOSITING) 242 if (shouldSync) { 243 QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); 244 shouldSync = false; 245 } 246 #endif 76 247 } 77 248 … … 108 279 { 109 280 q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll)); 281 282 #if USE(ACCELERATED_COMPOSITING) 283 updateCompositingScrollPosition(); 284 #endif 110 285 } 111 286 … … 113 288 { 114 289 q->update(QRectF(dirtyRect)); 290 291 createOrDeleteOverlay(); 292 if (overlay) 293 overlay->update(QRectF(dirtyRect)); 294 #if USE(ACCELERATED_COMPOSITING) 295 updateCompositingScrollPosition(); 296 syncLayers(); 297 #endif 115 298 } 116 299 … … 161 344 { 162 345 #if defined(Q_WS_X11) 163 const QList<QGraphicsView*> views = q->scene()->views(); 164 165 if (!views.isEmpty()) 166 return views.at(0)->x11Info().screen(); 346 if (QGraphicsScene* scene = q->scene()) { 347 const QList<QGraphicsView*> views = scene->views(); 348 349 if (!views.isEmpty()) 350 return views.at(0)->x11Info().screen(); 351 } 167 352 #endif 168 353 … … 172 357 QWidget* QGraphicsWebViewPrivate::ownerWidget() const 173 358 { 174 const QList<QGraphicsView*> views = q->scene()->views(); 175 return views.value(0); 359 if (QGraphicsScene* scene = q->scene()) { 360 const QList<QGraphicsView*> views = scene->views(); 361 return views.value(0); 362 } 363 return 0; 364 } 365 366 QRect QGraphicsWebViewPrivate::geometryRelativeToOwnerWidget() const 367 { 368 if (!q->scene()) 369 return QRect(); 370 371 QList<QGraphicsView*> views = q->scene()->views(); 372 if (views.isEmpty()) 373 return QRect(); 374 375 QGraphicsView* view = views.at(0); 376 return view->mapFromScene(q->boundingRect()).boundingRect(); 176 377 } 177 378 … … 180 381 return q; 181 382 } 383 384 QStyle* QGraphicsWebViewPrivate::style() const 385 { 386 return q->style(); 387 } 388 389 void QGraphicsWebViewPrivate::updateResizesToContentsForPage() 390 { 391 ASSERT(page); 392 393 if (resizesToContents) { 394 // resizes to contents mode requires preferred contents size to be set 395 if (!page->preferredContentsSize().isValid()) 396 page->setPreferredContentsSize(QSize(960, 800)); 397 398 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 399 QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), 400 q, SLOT(_q_contentsSizeChanged(const QSize&)), Qt::UniqueConnection); 401 #else 402 QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), 403 q, SLOT(_q_contentsSizeChanged(const QSize&))); 404 #endif 405 } else { 406 QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), 407 q, SLOT(_q_contentsSizeChanged(const QSize&))); 408 } 409 } 410 411 void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size) 412 { 413 if (!resizesToContents) 414 return; 415 q->setGeometry(QRectF(q->geometry().topLeft(), size)); 416 } 417 418 void QGraphicsWebViewPrivate::_q_scaleChanged() 419 { 420 #if ENABLE(TILED_BACKING_STORE) 421 updateTiledBackingStoreScale(); 422 #endif 423 } 424 425 QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const 426 { 427 if (!q->scene()) 428 return QRectF(); 429 QList<QGraphicsView*> views = q->scene()->views(); 430 if (views.size() > 1) { 431 #ifndef QT_NO_DEBUG_STREAM 432 qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect"; 433 #endif 434 return QRectF(); 435 } 436 if (views.size() < 1) 437 return QRectF(); 438 439 int xPosition = views[0]->horizontalScrollBar()->value(); 440 int yPosition = views[0]->verticalScrollBar()->value(); 441 return q->mapRectFromScene(QRectF(QPoint(xPosition, yPosition), views[0]->viewport()->size())); 442 } 443 444 #if ENABLE(TILED_BACKING_STORE) 445 void QGraphicsWebViewPrivate::updateTiledBackingStoreScale() 446 { 447 if (!page) 448 return; 449 WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page->mainFrame())->tiledBackingStore(); 450 if (!backingStore) 451 return; 452 backingStore->setContentsScale(q->scale()); 453 } 454 #endif 182 455 183 456 /*! … … 267 540 setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); 268 541 #endif 542 setAcceptDrops(true); 269 543 setAcceptHoverEvents(true); 544 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 545 setAcceptTouchEvents(true); 546 #endif 270 547 setFocusPolicy(Qt::StrongFocus); 548 setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); 549 #if ENABLE(TILED_BACKING_STORE) 550 QObject::connect(this, SIGNAL(scaleChanged()), this, SLOT(_q_scaleChanged())); 551 #endif 271 552 } 272 553 … … 318 599 void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*) 319 600 { 320 page()->mainFrame()->render(painter, option->exposedRect.toRect()); 601 #if ENABLE(TILED_BACKING_STORE) 602 if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) { 603 // FIXME: We should set the backing store viewport earlier than in paint 604 backingStore->adjustVisibleRect(); 605 // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change. 606 WebCore::GraphicsContext context(painter); 607 page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect()); 608 return; 609 } 610 #endif 611 #if USE(ACCELERATED_COMPOSITING) 612 page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); 613 #else 614 page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect()); 615 #endif 321 616 } 322 617 … … 326 621 { 327 622 // Re-implemented in order to allows fixing event-related bugs in patch releases. 623 624 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 625 if (d->page && (event->type() == QEvent::TouchBegin 626 || event->type() == QEvent::TouchEnd 627 || event->type() == QEvent::TouchUpdate)) { 628 d->page->event(event); 629 if (event->isAccepted()) 630 return true; 631 } 632 #endif 633 328 634 return QGraphicsWidget::sceneEvent(event); 329 635 } … … 392 698 { 393 699 #ifndef QT_NO_CURSOR 394 #if QT_VERSION >= 0x040400395 700 if (event->type() == QEvent::CursorChange) { 396 701 // An unsetCursor will set the cursor to Qt::ArrowCursor. … … 406 711 } 407 712 #endif 408 #endif409 713 } 410 714 } 411 715 return QGraphicsWidget::event(event); 716 } 717 718 void QGraphicsWebViewPrivate::unsetPageIfExists() 719 { 720 if (!page) 721 return; 722 723 // if the page client is the special client constructed for 724 // delegating the responsibilities to a QWidget, we need 725 // to destroy it. 726 727 if (page->d->client && page->d->client->isQWidgetClient()) 728 delete page->d->client; 729 730 page->d->client = 0; 731 732 // if the page was created by us, we own it and need to 733 // destroy it as well. 734 735 if (page->parent() == q) 736 delete page; 737 else 738 page->disconnect(q); 412 739 } 413 740 … … 426 753 return; 427 754 428 if (d->page) { 429 d->page->d->client = 0; // unset the page client 430 if (d->page->parent() == this) 431 delete d->page; 432 else 433 d->page->disconnect(this); 434 } 435 755 d->unsetPageIfExists(); 436 756 d->page = page; 757 437 758 if (!d->page) 438 759 return; 760 439 761 d->page->d->client = d; // set the page client 762 763 if (d->overlay) 764 d->overlay->prepareGeometryChange(); 440 765 441 766 QSize size = geometry().size().toSize(); 442 767 page->setViewportSize(size); 768 769 if (d->resizesToContents) 770 d->updateResizesToContentsForPage(); 443 771 444 772 QWebFrame* mainFrame = d->page->mainFrame(); … … 524 852 /*! 525 853 \property QGraphicsWebView::zoomFactor 526 \since 4.5527 854 \brief the zoom factor for the view 528 855 */ … … 545 872 void QGraphicsWebView::updateGeometry() 546 873 { 874 if (d->overlay) 875 d->overlay->prepareGeometryChange(); 876 547 877 QGraphicsWidget::updateGeometry(); 548 878 … … 559 889 { 560 890 QGraphicsWidget::setGeometry(rect); 891 892 if (d->overlay) 893 d->overlay->prepareGeometryChange(); 561 894 562 895 if (!d->page) … … 730 1063 QAction *QGraphicsWebView::pageAction(QWebPage::WebAction action) const 731 1064 { 1065 #ifdef QT_NO_ACTION 1066 Q_UNUSED(action) 1067 return 0; 1068 #else 732 1069 return page()->action(action); 1070 #endif 733 1071 } 734 1072 … … 765 1103 return d->page->findText(subString, options); 766 1104 return false; 1105 } 1106 1107 /*! 1108 \property QGraphicsWebView::resizesToContents 1109 \brief whether the size of the QGraphicsWebView and its viewport changes to match the contents size 1110 \since 4.7 1111 1112 If this property is set, the QGraphicsWebView will automatically change its 1113 size to match the size of the main frame contents. As a result the top level frame 1114 will never have scrollbars. It will also make CSS fixed positioning to behave like absolute positioning 1115 with elements positioned relative to the document instead of the viewport. 1116 1117 This property should be used in conjunction with the QWebPage::preferredContentsSize property. 1118 If not explicitly set, the preferredContentsSize is automatically set to a reasonable value. 1119 1120 \sa QWebPage::setPreferredContentsSize() 1121 */ 1122 void QGraphicsWebView::setResizesToContents(bool enabled) 1123 { 1124 if (d->resizesToContents == enabled) 1125 return; 1126 d->resizesToContents = enabled; 1127 if (d->page) 1128 d->updateResizesToContentsForPage(); 1129 } 1130 1131 bool QGraphicsWebView::resizesToContents() const 1132 { 1133 return d->resizesToContents; 1134 } 1135 1136 /*! 1137 \property QGraphicsWebView::tiledBackingStoreFrozen 1138 \brief whether the tiled backing store updates its contents 1139 \since 4.7 1140 1141 If the tiled backing store is enabled using QWebSettings::TiledBackingStoreEnabled attribute, this property 1142 can be used to disable backing store updates temporarily. This can be useful for example for running 1143 a smooth animation that changes the scale of the QGraphicsWebView. 1144 1145 When the backing store is unfrozen, its contents will be automatically updated to match the current 1146 state of the document. If the QGraphicsWebView scale was changed, the backing store is also 1147 re-rendered using the new scale. 1148 1149 If the tiled backing store is not enabled, this property does nothing. 1150 1151 \sa QWebSettings::TiledBackingStoreEnabled 1152 \sa QGraphicsObject::scale 1153 */ 1154 bool QGraphicsWebView::isTiledBackingStoreFrozen() const 1155 { 1156 #if ENABLE(TILED_BACKING_STORE) 1157 WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore(); 1158 if (!backingStore) 1159 return false; 1160 return backingStore->contentsFrozen(); 1161 #else 1162 return false; 1163 #endif 1164 } 1165 1166 void QGraphicsWebView::setTiledBackingStoreFrozen(bool frozen) 1167 { 1168 #if ENABLE(TILED_BACKING_STORE) 1169 WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore(); 1170 if (!backingStore) 1171 return; 1172 backingStore->setContentsFrozen(frozen); 1173 #else 1174 UNUSED_PARAM(frozen); 1175 #endif 767 1176 } 768 1177 … … 904 1313 { 905 1314 #ifndef QT_NO_DRAGANDDROP 906 //if (d->page) 907 // d->page->event(ev); 908 //Just remove this line below when the code above is working 909 Q_UNUSED(ev); 1315 if (d->page) 1316 d->page->event(ev); 910 1317 #else 911 1318 Q_UNUSED(ev); -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
r769 r846 46 46 47 47 Q_PROPERTY(bool modified READ isModified) 48 Q_PROPERTY(bool resizesToContents READ resizesToContents WRITE setResizesToContents) 49 Q_PROPERTY(bool tiledBackingStoreFrozen READ isTiledBackingStoreFrozen WRITE setTiledBackingStoreFrozen) 48 50 49 51 public: … … 79 81 80 82 bool findText(const QString& subString, QWebPage::FindFlags options = 0); 83 84 bool resizesToContents() const; 85 void setResizesToContents(bool enabled); 86 87 bool isTiledBackingStoreFrozen() const; 88 void setTiledBackingStoreFrozen(bool frozen); 81 89 82 90 virtual void setGeometry(const QRectF& rect); … … 137 145 Q_PRIVATE_SLOT(d, void _q_updateMicroFocus()) 138 146 Q_PRIVATE_SLOT(d, void _q_pageDestroyed()) 147 // we don't want to change the moc based on USE() macro, so this function is here 148 // but will be empty if ACCLERATED_COMPOSITING is disabled 149 Q_PRIVATE_SLOT(d, void syncLayers()) 150 Q_PRIVATE_SLOT(d, void _q_contentsSizeChanged(const QSize&)) 151 Q_PRIVATE_SLOT(d, void _q_scaleChanged()) 139 152 140 153 QGraphicsWebViewPrivate* const d; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
r561 r846 40 40 databases. 41 41 42 To get access to all databases defined by a security origin, use QWebSecurityOrigin::databases(). 43 Each database has an internal name(), as well as a user-friendly name, provided by displayName(). 42 Databases are grouped together in security origins. To get access to all databases defined by 43 a security origin, use QWebSecurityOrigin::databases(). Each database has an internal name(), 44 as well as a user-friendly name, provided by displayName(). These names are specified when 45 creating the database in the JavaScript code. 44 46 45 47 WebKit uses SQLite to create and access the local SQL databases. The location of the database … … 50 52 in bytes is returned by size(). 51 53 52 For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML 5Draft Standard}.54 For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML5 Web SQL Database Draft Standard}. 53 55 54 56 \sa QWebSecurityOrigin … … 81 83 82 84 /*! 83 Returns the name of the database as seen bythe user.85 Returns the name of the database in a format that is suitable for display to the user. 84 86 */ 85 87 QString QWebDatabase::displayName() const -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
r561 r846 39 39 #include "PropertyNameArray.h" 40 40 #include "RenderImage.h" 41 #include "ScriptFunctionCall.h"42 41 #include "StaticNodeList.h" 43 42 #include "qt_runtime.h" … … 86 85 \snippet webkitsnippets/webelement/main.cpp Traversing with QWebElement 87 86 87 Individual elements can be inspected or changed using methods such as attribute() 88 or setAttribute(). For examle, to capture the user's input in a text field for later 89 use (auto-completion), a browser could do something like this: 90 91 \snippet webkitsnippets/webelement/main.cpp autocomplete1 92 93 When the same page is later revisited, the browser can fill in the text field automatically 94 by modifying the value attribute of the input element: 95 96 \snippet webkitsnippets/webelement/main.cpp autocomplete2 97 98 Another use case is to emulate a click event on an element. The following 99 code snippet demonstrates how to call the JavaScript DOM method click() of 100 a submit button: 101 102 \snippet webkitsnippets/webelement/main.cpp Calling a DOM element method 103 88 104 The underlying content of QWebElement is explicitly shared. Creating a copy 89 105 of a QWebElement does not create a copy of the content. Instead, both 90 106 instances point to the same element. 91 92 The element's attributes can be read using attribute() and modified with93 setAttribute().94 107 95 108 The contents of child elements can be converted to plain text with … … 866 879 867 880 QStringList classes = attribute(QLatin1String("class")).simplified().split(QLatin1Char(' '), QString::SkipEmptyParts); 868 #if QT_VERSION >= 0x040500869 881 classes.removeDuplicates(); 870 #else871 int n = classes.size();872 int j = 0;873 QSet<QString> seen;874 seen.reserve(n);875 for (int i = 0; i < n; ++i) {876 const QString& s = classes.at(i);877 if (seen.contains(s))878 continue;879 seen.insert(s);880 if (j != i)881 classes[j] = s;882 ++j;883 }884 if (n != j)885 classes.erase(classes.begin() + j, classes.end());886 #endif887 882 return classes; 888 883 } -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
r769 r846 31 31 class Element; 32 32 class Node; 33 } 34 35 namespace JSC { 36 namespace Bindings { 37 class QtWebElementRuntime; 38 } 33 39 } 34 40 … … 154 160 friend class QWebHitTestResultPrivate; 155 161 friend class QWebPage; 162 friend class JSC::Bindings::QtWebElementRuntime; 156 163 157 164 QWebElementPrivate* d; … … 256 263 }; 257 264 265 Q_DECLARE_METATYPE(QWebElement) 266 258 267 #endif // QWEBELEMENT_H -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
r769 r846 22 22 #include "qwebframe.h" 23 23 24 #include "Bridge.h" 24 25 #include "CallFrame.h" 25 26 #include "Document.h" … … 57 58 #include "SelectionController.h" 58 59 #include "SubstituteData.h" 60 #include "SVGSMILElement.h" 61 #include "TiledBackingStore.h" 59 62 #include "htmlediting.h" 60 63 #include "markup.h" … … 67 70 #include "qwebsecurityorigin.h" 68 71 #include "qwebsecurityorigin_p.h" 69 #include "runtime.h"70 72 #include "runtime_object.h" 71 73 #include "runtime_root.h" … … 78 80 #include <qprinter.h> 79 81 #include <qregion.h> 80 81 #if QT_VERSION < 0x04040082 #include "qwebnetworkinterface.h"83 #endif84 85 #if QT_VERSION >= 0x04040086 82 #include <qnetworkrequest.h> 87 #endif88 83 89 84 using namespace WebCore; … … 93 88 extern Q_GUI_EXPORT int qt_defaultDpi(); 94 89 QT_END_NAMESPACE 90 91 void QWEBKIT_EXPORT qt_drt_setMediaType(QWebFrame* qframe, const QString& type) 92 { 93 WebCore::Frame* frame = QWebFramePrivate::core(qframe); 94 WebCore::FrameView* view = frame->view(); 95 view->setMediaType(type); 96 frame->document()->updateStyleSelector(); 97 view->forceLayout(); 98 } 99 100 bool QWEBKIT_EXPORT qt_drt_hasDocumentElement(QWebFrame* qframe) 101 { 102 return QWebFramePrivate::core(qframe)->document()->documentElement(); 103 } 95 104 96 105 void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled) … … 151 160 } 152 161 162 // Pause a given SVG animation on the target node at a specific time. 163 // This method is only intended to be used for testing the SVG animation system. 164 bool QWEBKIT_EXPORT qt_drt_pauseSVGAnimation(QWebFrame *qframe, const QString &animationId, double time, const QString &elementId) 165 { 166 #if !ENABLE(SVG) 167 return false; 168 #else 169 Frame* frame = QWebFramePrivate::core(qframe); 170 if (!frame) 171 return false; 172 173 Document* doc = frame->document(); 174 Q_ASSERT(doc); 175 176 if (!doc->svgExtensions()) 177 return false; 178 179 Node* coreNode = doc->getElementById(animationId); 180 if (!coreNode || !SVGSMILElement::isSMILElement(coreNode)) 181 return false; 182 183 return doc->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time); 184 #endif 185 } 186 153 187 // Returns the total number of currently running animations (includes both CSS transitions and CSS animations). 154 188 int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe) … … 197 231 } 198 232 233 int QWEBKIT_EXPORT qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height) 234 { 235 Frame* frame = QWebFramePrivate::core(qFrame); 236 if (!frame) 237 return -1; 238 239 Element* element = frame->document()->getElementById(AtomicString(id)); 240 if (!element) 241 return -1; 242 243 return PrintContext::pageNumberForElement(element, FloatSize(width, height)); 244 } 245 246 int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height) 247 { 248 Frame* frame = QWebFramePrivate::core(qFrame); 249 if (!frame) 250 return -1; 251 252 return PrintContext::numberOfPages(frame, FloatSize(width, height)); 253 } 254 199 255 // Suspend active DOM objects in this frame. 200 256 void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame) … … 212 268 frame->document()->resumeActiveDOMObjects(); 213 269 } 270 271 void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script) 272 { 273 Frame* frame = QWebFramePrivate::core(qFrame); 274 if (frame) 275 JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue(); 276 } 277 278 bool QWEBKIT_EXPORT qtwebkit_webframe_scrollOverflow(QWebFrame* qFrame, int dx, int dy, const QPoint& pos) 279 { 280 WebCore::Frame* frame = QWebFramePrivate::core(qFrame); 281 if (!frame || !frame->document() || !frame->view() || !frame->eventHandler()) 282 return false; 283 284 QPoint contentsPos = frame->view()->windowToContents(pos); 285 Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y()); 286 if (!node) 287 return false; 288 289 RenderObject* renderer = node->renderer(); 290 if (!renderer) 291 return false; 292 293 if (renderer->isListBox()) 294 return false; 295 296 RenderLayer* renderLayer = renderer->enclosingLayer(); 297 if (!renderLayer) 298 return false; 299 300 bool scrolledHorizontal = false; 301 bool scrolledVertical = false; 302 303 do { 304 if (dx > 0) 305 scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); 306 else if (dx < 0) 307 scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); 308 309 if (dy > 0) 310 scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); 311 else if (dy < 0) 312 scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); 313 314 if (scrolledHorizontal || scrolledVertical) 315 return true; 316 317 renderLayer = renderLayer->parent(); 318 } while (renderLayer); 319 320 return false; 321 } 322 323 324 /*! 325 \internal 326 Scrolls nested frames starting at this frame, \a dx pixels to the right 327 and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts 328 to scroll elements with CSS overflow at position pos, followed by this frame. If this 329 frame doesn't scroll, attempts to scroll the parent 330 */ 331 void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos) 332 { 333 if (!qFrame) 334 return; 335 336 if (qtwebkit_webframe_scrollOverflow(qFrame, dx, dy, pos)) 337 return; 338 339 bool scrollHorizontal = false; 340 bool scrollVertical = false; 341 342 do { 343 if (dx > 0) // scroll right 344 scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal); 345 else if (dx < 0) // scroll left 346 scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal); 347 348 if (dy > 0) // scroll down 349 scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical); 350 else if (dy < 0) //scroll up 351 scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical); 352 353 if (scrollHorizontal || scrollVertical) { 354 qFrame->scroll(dx, dy); 355 return; 356 } 357 358 qFrame = qFrame->parentFrame(); 359 } while (qFrame); 360 } 361 214 362 215 363 QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, … … 246 394 } 247 395 396 void QWebFramePrivate::setPage(QWebPage* newPage) 397 { 398 if (page == newPage) 399 return; 400 401 // The QWebFrame is created as a child of QWebPage or a parent QWebFrame. 402 // That adds it to QObject's internal children list and ensures it will be 403 // deleted when parent QWebPage is deleted. Reparent if needed. 404 if (q->parent() == qobject_cast<QObject*>(page)) 405 q->setParent(newPage); 406 407 page = newPage; 408 emit q->pageChanged(); 409 } 410 248 411 WebCore::Scrollbar* QWebFramePrivate::horizontalScrollBar() const 249 412 { … … 260 423 } 261 424 262 void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip) 263 { 425 #if ENABLE(TILED_BACKING_STORE) 426 void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, const QRegion& clip) 427 { 428 ASSERT(frame->tiledBackingStore()); 429 264 430 if (!frame->view() || !frame->contentRenderer()) 265 431 return; … … 269 435 return; 270 436 271 GraphicsContext context(painter); 272 if (context.paintingDisabled() && !context.updatingControlTints()) 437 QPainter* painter = context->platformContext(); 438 439 WebCore::FrameView* view = frame->view(); 440 441 int scrollX = view->scrollX(); 442 int scrollY = view->scrollY(); 443 context->translate(-scrollX, -scrollY); 444 445 for (int i = 0; i < vector.size(); ++i) { 446 const QRect& clipRect = vector.at(i); 447 448 painter->save(); 449 450 QRect rect = clipRect.translated(scrollX, scrollY); 451 painter->setClipRect(rect, Qt::IntersectClip); 452 453 frame->tiledBackingStore()->paint(context, rect); 454 455 painter->restore(); 456 } 457 } 458 #endif 459 460 void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip) 461 { 462 if (!frame->view() || !frame->contentRenderer()) 273 463 return; 464 465 QVector<QRect> vector = clip.rects(); 466 if (vector.isEmpty()) 467 return; 468 469 QPainter* painter = context->platformContext(); 274 470 275 471 WebCore::FrameView* view = frame->view(); … … 278 474 for (int i = 0; i < vector.size(); ++i) { 279 475 const QRect& clipRect = vector.at(i); 476 280 477 QRect intersectedRect = clipRect.intersected(view->frameRect()); 281 478 … … 287 484 288 485 if (layer & QWebFrame::ContentsLayer) { 289 context .save();486 context->save(); 290 487 291 488 int scrollX = view->scrollX(); … … 293 490 294 491 QRect rect = intersectedRect; 295 context .translate(x, y);492 context->translate(x, y); 296 493 rect.translate(-x, -y); 297 context .translate(-scrollX, -scrollY);494 context->translate(-scrollX, -scrollY); 298 495 rect.translate(scrollX, scrollY); 299 context .clip(view->visibleContentRect());300 301 view->paintContents( &context, rect);302 303 context .restore();496 context->clip(view->visibleContentRect()); 497 498 view->paintContents(context, rect); 499 500 context->restore(); 304 501 } 305 502 … … 307 504 && !view->scrollbarsSuppressed() 308 505 && (view->horizontalScrollbar() || view->verticalScrollbar())) { 309 context .save();506 context->save(); 310 507 311 508 QRect rect = intersectedRect; 312 context .translate(x, y);509 context->translate(x, y); 313 510 rect.translate(-x, -y); 314 511 315 view->paintScrollbars( &context, rect);316 317 context .restore();512 view->paintScrollbars(context, rect); 513 514 context->restore(); 318 515 } 319 516 517 #if ENABLE(PAN_SCROLLING) 320 518 if (layer & QWebFrame::PanIconLayer) 321 view->paintPanScrollIcon(&context); 519 view->paintPanScrollIcon(context); 520 #endif 322 521 323 522 painter->restore(); 324 523 } 325 524 } 326 327 bool QWEBKIT_EXPORT qtwebkit_webframe_scrollOverflow(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)328 {329 WebCore::Frame* frame = QWebFramePrivate::core(qFrame);330 if (!frame || !frame->document() || !frame->view() || !frame->eventHandler())331 return false;332 333 QPoint contentsPos = frame->view()->windowToContents(pos);334 Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y());335 if (!node)336 return false;337 338 RenderObject* renderer = node->renderer();339 if (!renderer)340 return false;341 342 if (renderer->isListBox())343 return false;344 345 RenderLayer* renderLayer = renderer->enclosingLayer();346 if (!renderLayer)347 return false;348 349 bool scrolledHorizontal = false;350 bool scrolledVertical = false;351 352 do {353 if (dx > 0)354 scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);355 else if (dx < 0)356 scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));357 358 if (dy > 0)359 scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);360 else if (dy < 0)361 scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));362 363 if (scrolledHorizontal || scrolledVertical)364 return true;365 366 renderLayer = renderLayer->parent();367 } while (renderLayer);368 369 return false;370 }371 372 373 374 375 525 376 526 /*! … … 411 561 to be notified when a new frame is created. 412 562 413 The hitTestContent() function can be used to programmatically examine the 414 contents of a frame. 563 There are multiple ways to programmatically examine the contents of a frame. 564 The hitTestContent() function can be used to find elements by coordinate. 565 For access to the underlying DOM tree, there is documentElement(), 566 findAllElements() and findFirstElement(). 415 567 416 568 A QWebFrame can be printed onto a QPrinter using the print() function. … … 564 716 d->frame->view()->layout(); 565 717 566 return externalRepresentation(d->frame ->contentRenderer());718 return externalRepresentation(d->frame); 567 719 } 568 720 … … 639 791 \property QWebFrame::url 640 792 \brief the url of the frame currently viewed 793 794 Setting this property clears the view and loads the URL. 795 796 By default, this property contains an empty, invalid URL. 641 797 642 798 \sa urlChanged() … … 736 892 void QWebFrame::load(const QUrl &url) 737 893 { 738 #if QT_VERSION < 0x040400739 load(QWebNetworkRequest(ensureAbsoluteUrl(url)));740 #else741 894 load(QNetworkRequest(ensureAbsoluteUrl(url))); 742 #endif 743 } 744 745 #if QT_VERSION < 0x040400 746 /*! 747 Loads a network request, \a req, into this frame. 748 749 \note The view remains the same until enough data has arrived to display the new url. 750 */ 751 void QWebFrame::load(const QWebNetworkRequest &req) 752 { 753 if (d->parentFrame()) 754 d->page->d->insideOpenCall = true; 755 756 QUrl url = ensureAbsoluteUrl(req.url()); 757 QHttpRequestHeader httpHeader = req.httpHeader(); 758 QByteArray postData = req.postData(); 759 760 WebCore::ResourceRequest request(url); 761 762 QString method = httpHeader.method(); 763 if (!method.isEmpty()) 764 request.setHTTPMethod(method); 765 766 QList<QPair<QString, QString> > values = httpHeader.values(); 767 for (int i = 0; i < values.size(); ++i) { 768 const QPair<QString, QString> &val = values.at(i); 769 request.addHTTPHeaderField(val.first, val.second); 770 } 771 772 if (!postData.isEmpty()) 773 request.setHTTPBody(WebCore::FormData::create(postData.constData(), postData.size())); 774 775 d->frame->loader()->load(request, false); 776 777 if (d->parentFrame()) 778 d->page->d->insideOpenCall = false; 779 } 780 781 #else 895 } 782 896 783 897 /*! … … 787 901 \a body is optional and is only used for POST operations. 788 902 789 \note The view remains the same until enough data has arrived to display the new \a url.903 \note The view remains the same until enough data has arrived to display the new content. 790 904 791 905 \sa setUrl() … … 839 953 d->page->d->insideOpenCall = false; 840 954 } 841 #endif842 955 843 956 /*! … … 951 1064 d->horizontalScrollBarPolicy = policy; 952 1065 if (d->frame->view()) { 953 d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy); 1066 d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */); 1067 d->frame->view()->updateCanHaveScrollbars(); 954 1068 } 955 1069 } else { 956 1070 d->verticalScrollBarPolicy = policy; 957 1071 if (d->frame->view()) { 958 d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy); 1072 d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */); 1073 d->frame->view()->updateCanHaveScrollbars(); 959 1074 } 960 1075 } … … 1058 1173 1059 1174 /*! 1060 \internal1061 Scrolls nested frames starting at this frame, \a dx pixels to the right1062 and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts1063 to scroll elements with CSS overflow at position pos, followed by this frame. If this1064 frame doesn't scroll, attempts to scroll the parent1065 */1066 void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)1067 {1068 if (!qFrame)1069 return;1070 1071 if (qtwebkit_webframe_scrollOverflow(qFrame, dx, dy, pos))1072 return;1073 1074 bool scrollHorizontal = false;1075 bool scrollVertical = false;1076 1077 do {1078 if (dx > 0) // scroll right1079 scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal);1080 else if (dx < 0) // scroll left1081 scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal);1082 1083 if (dy > 0) // scroll down1084 scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical);1085 else if (dy < 0) //scroll up1086 scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical);1087 1088 if (scrollHorizontal || scrollVertical) {1089 qFrame->scroll(dx, dy);1090 return;1091 }1092 1093 qFrame = qFrame->parentFrame();1094 } while (qFrame);1095 }1096 1097 /*!1098 1175 \property QWebFrame::scrollPosition 1099 1176 \since 4.5 … … 1119 1196 1120 1197 /*! 1198 \since 4.7 1199 Scrolls the frame to the given \a anchor name. 1200 */ 1201 void QWebFrame::scrollToAnchor(const QString& anchor) 1202 { 1203 FrameView *view = d->frame->view(); 1204 if (view) 1205 view->scrollToAnchor(anchor); 1206 } 1207 1208 /*! 1121 1209 \since 4.6 1122 1210 Render the \a layer of the frame using \a painter clipping to \a clip. … … 1127 1215 void QWebFrame::render(QPainter* painter, RenderLayer layer, const QRegion& clip) 1128 1216 { 1217 GraphicsContext context(painter); 1218 if (context.paintingDisabled() && !context.updatingControlTints()) 1219 return; 1220 1129 1221 if (!clip.isEmpty()) 1130 d->render Private(painter, layer, clip);1222 d->renderRelativeCoords(&context, layer, clip); 1131 1223 else if (d->frame->view()) 1132 d->render Private(painter, layer, QRegion(d->frame->view()->frameRect()));1224 d->renderRelativeCoords(&context, layer, QRegion(d->frame->view()->frameRect())); 1133 1225 } 1134 1226 … … 1136 1228 Render the frame into \a painter clipping to \a clip. 1137 1229 */ 1138 void QWebFrame::render(QPainter *painter, const QRegion &clip) 1139 { 1140 d->renderPrivate(painter, AllLayers, clip); 1230 void QWebFrame::render(QPainter* painter, const QRegion& clip) 1231 { 1232 GraphicsContext context(painter); 1233 if (context.paintingDisabled() && !context.updatingControlTints()) 1234 return; 1235 1236 d->renderRelativeCoords(&context, AllLayers, clip); 1141 1237 } 1142 1238 … … 1144 1240 Render the frame into \a painter. 1145 1241 */ 1146 void QWebFrame::render(QPainter *painter)1242 void QWebFrame::render(QPainter* painter) 1147 1243 { 1148 1244 if (!d->frame->view()) 1149 1245 return; 1150 1246 1151 d->renderPrivate(painter, AllLayers, QRegion(d->frame->view()->frameRect())); 1247 GraphicsContext context(painter); 1248 if (context.paintingDisabled() && !context.updatingControlTints()) 1249 return; 1250 1251 d->renderRelativeCoords(&context, AllLayers, QRegion(d->frame->view()->frameRect())); 1152 1252 } 1153 1253 … … 1170 1270 void QWebFrame::setTextSizeMultiplier(qreal factor) 1171 1271 { 1172 d->frame->setZoomFactor(factor, /*isTextOnly*/true);1272 d->frame->setZoomFactor(factor, ZoomTextOnly); 1173 1273 } 1174 1274 … … 1189 1289 void QWebFrame::setZoomFactor(qreal factor) 1190 1290 { 1191 d->frame->setZoomFactor(factor, d->frame-> isZoomFactorTextOnly());1291 d->frame->setZoomFactor(factor, d->frame->zoomMode()); 1192 1292 } 1193 1293 … … 1336 1436 return; 1337 1437 1338 const qreal zoomFactorX = printer->logicalDpiX() / qt_defaultDpi();1339 const qreal zoomFactorY = printer->logicalDpiY() / qt_defaultDpi();1438 const qreal zoomFactorX = (qreal)printer->logicalDpiX() / qt_defaultDpi(); 1439 const qreal zoomFactorY = (qreal)printer->logicalDpiY() / qt_defaultDpi(); 1340 1440 1341 1441 PrintContext printContext(d->frame); -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
r561 r846 27 27 #include <QtGui/qicon.h> 28 28 #include <QtScript/qscriptengine.h> 29 #if QT_VERSION >= 0x04040030 29 #include <QtNetwork/qnetworkaccessmanager.h> 31 #endif32 30 #include "qwebkitglobal.h" 33 31 … … 124 122 125 123 void load(const QUrl &url); 126 #if QT_VERSION < 0x040400127 void load(const QWebNetworkRequest &request);128 #else129 124 void load(const QNetworkRequest &request, 130 125 QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, 131 126 const QByteArray &body = QByteArray()); 132 #endif133 127 void setHtml(const QString &html, const QUrl &baseUrl = QUrl()); 134 128 void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl()); … … 166 160 void setScrollPosition(const QPoint &pos); 167 161 162 void scrollToAnchor(const QString& anchor); 163 168 164 enum RenderLayer { 169 165 ContentsLayer = 0x10, … … 223 219 void loadFinished(bool ok); 224 220 221 void pageChanged(); 222 225 223 private: 224 friend class QGraphicsWebView; 226 225 friend class QWebPage; 227 226 friend class QWebPagePrivate; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
r561 r846 26 26 27 27 #include "EventHandler.h" 28 #include "GraphicsContext.h" 28 29 #include "KURL.h" 29 30 #include "PlatformString.h" … … 73 74 {} 74 75 void init(QWebFrame* qframe, QWebFrameData* frameData); 76 void setPage(QWebPage*); 75 77 76 78 inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); } … … 82 84 static QWebFrame* kit(WebCore::Frame*); 83 85 84 void renderPrivate(QPainter*, QWebFrame::RenderLayer, const QRegion& clip); 85 86 bool scrollOverflow(int dx, int dy); 86 void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip); 87 #if ENABLE(TILED_BACKING_STORE) 88 void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip); 89 #endif 87 90 88 91 QWebFrame *q; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp
r561 r846 541 541 } 542 542 d->lst->removeItem(nullItem); 543 // Update the HistoryController. 544 history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get()); 543 545 history.goToItem(history.itemAt(currentIndex)); 544 546 } -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp
r561 r846 42 42 /*! 43 43 Sets a new default interface, \a defaultInterface, that will be used by all of WebKit 44 for managing history.44 to keep track of visited links. 45 45 46 46 If an interface without a parent has already been set, the old interface will be deleted. … … 69 69 70 70 /*! 71 Returns the default interface that will be used by WebKit. If no 72 default interface has been set, QtWebkit will not track history. 71 Returns the default interface that will be used by WebKit. If no default interface has been set, 72 Webkit will not keep track of visited links and a null pointer will be returned. 73 \sa setDefaultInterface 73 74 */ 74 75 QWebHistoryInterface* QWebHistoryInterface::defaultInterface() … … 85 86 86 87 The QWebHistoryInterface is an interface that can be used to 87 implement link history. It contains two pure virtual methods that 88 are called by the WebKit engine. addHistoryEntry() is used to add 89 pages that have been visited to the interface, while 90 historyContains() is used to query whether this page has been 91 visited by the user. 88 keep track of visited links. It contains two pure virtual methods that 89 are called by the WebKit engine: addHistoryEntry() is used to add 90 urls that have been visited to the interface, while 91 historyContains() is used to query whether the given url has been 92 visited by the user. By default the QWebHistoryInterface is not set, so WebKit does not keep 93 track of visited links. 94 95 \note The history tracked by QWebHistoryInterface is not specific to an instance of QWebPage 96 but applies to all pages. 92 97 */ 93 98 … … 101 106 102 107 /*! 103 Destr uctor. If this is currently the default interface it will be unset.108 Destroys the interface. If this is currently the default interface it will be unset. 104 109 */ 105 110 QWebHistoryInterface::~QWebHistoryInterface() -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
r561 r846 32 32 \class QWebInspector 33 33 \since 4.6 34 \inmodule QtWebKit 34 35 \brief The QWebInspector class allows the placement and control of a 35 36 QWebPage's inspector. 36 The inspector allows you to see a page current hierarchy and loading 37 statistics. 38 39 The QWebPage to be inspected is determined with the setPage() method. 37 The inspector can display a page's hierarchy, its loading statistics and 38 the current state of its individual elements. It is mostly used by web 39 developers. 40 41 The QWebPage to be inspected must be specified using the setPage() method. 40 42 41 43 A typical use of QWebInspector follows: 42 44 43 45 \snippet webkitsnippets/qtwebkit_qwebinspector_snippet.cpp 0 46 47 A QWebInspector can be made visible either programmatically using 48 setVisible(), or by the user through the attached QWebPage's context 49 menu. 44 50 45 51 \note A QWebInspector will display a blank widget if either: … … 62 68 63 69 The inspector allows the user to configure some options through its 64 interface (e.g. the resource tracking "Always enable" option). 65 These settings are persisted automatically by QtWebKit using QSettings. 66 67 However since the QSettings object is instantiated using the empty 68 constructor, QCoreApplication::setOrganizationName() and 69 QCoreApplication::setApplicationName() must be called within your 70 application to enable the persistence of these options. 71 */ 72 73 /*! 74 Constructs an empty QWebInspector with parent \a parent. 70 user interface (e.g. the resource tracking "Always enable" option). 71 These settings will be persisted automatically by QtWebKit only if 72 your application previously called QCoreApplication::setOrganizationName() 73 and QCoreApplication::setApplicationName(). 74 See QSettings's default constructor documentation for an explanation 75 of why this is necessary. 76 */ 77 78 /*! 79 Constructs an unbound QWebInspector with \a parent as its parent. 75 80 */ 76 81 QWebInspector::QWebInspector(QWidget* parent) … … 90 95 91 96 /*! 92 Setsthe QWebPage to be inspected.93 94 There can only be one QWebInspector associated with a QWebPage95 and vices versa.96 97 Calling with \a page as null will break the current association, if any.98 99 If \a page is already associated to another QWebInspector, the association100 will be replaced and the previous QWebInspector will have no page101 associated.97 Bind this inspector to the QWebPage to be inspected. 98 99 \bold {Notes:} 100 \list 101 \o There can only be one QWebInspector associated with a QWebPage 102 and vice versa. 103 \o Calling this method with a null \a page will break the current association, if any. 104 \o If \a page is already associated to another QWebInspector, the association 105 will be replaced and the previous QWebInspector will become unbound 106 \endlist 102 107 103 108 \sa page() … … 140 145 bool QWebInspector::event(QEvent* ev) 141 146 { 142 if (ev->type() == QEvent::Close && d->page)143 d->page->d->inspectorController()->setWindowVisible(false);144 145 147 return QWidget::event(ev); 146 148 } … … 155 157 void QWebInspector::showEvent(QShowEvent* event) 156 158 { 159 #if ENABLE(INSPECTOR) 157 160 // Allows QWebInspector::show() to init the inspector. 158 161 if (d->page) 159 162 d->page->d->inspectorController()->show(); 163 #endif 160 164 } 161 165 … … 163 167 void QWebInspector::hideEvent(QHideEvent* event) 164 168 { 169 #if ENABLE(INSPECTOR) 170 if (d->page) 171 d->page->d->inspectorController()->close(); 172 #endif 173 } 174 175 /*! \reimp */ 176 void QWebInspector::closeEvent(QCloseEvent* event) 177 { 178 #if ENABLE(INSPECTOR) 179 if (d->page) 180 d->page->d->inspectorController()->close(); 181 #endif 165 182 } 166 183 -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
r561 r846 44 44 void showEvent(QShowEvent* event); 45 45 void hideEvent(QHideEvent* event); 46 void closeEvent(QCloseEvent* event); 46 47 47 48 private: … … 52 53 friend class QWebPagePrivate; 53 54 friend class WebCore::InspectorClientQt; 55 friend class WebCore::InspectorFrontendClientQt; 54 56 }; 55 57 #endif -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
r561 r846 23 23 #include <QtCore/qglobal.h> 24 24 25 #define QTWEBKIT_VERSION_STR "2.0.2" 26 // QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt. 27 #define QTWEBKIT_VERSION 0x020002 28 // Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt. 29 #define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) 30 25 31 #if defined(QT_MAKEDLL) /* create a Qt DLL library */ 26 32 # if defined(BUILD_WEBKIT) … … 41 47 #endif 42 48 43 #if QT_VERSION < 0x04040044 #ifndef QT_BEGIN_NAMESPACE45 #define QT_BEGIN_NAMESPACE46 #endif47 48 #ifndef QT_END_NAMESPACE49 #define QT_END_NAMESPACE50 #endif51 #endif52 53 54 49 #endif // QWEBKITGLOBAL_H -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp
r561 r846 23 23 24 24 /*! 25 \relates QWebPage 26 \since 4.6 27 Returns the version number of WebKit at run-time as a string (for 28 example, "531.3"). 25 29 26 Returns the version number of WebKit at run-time as a string (for 27 example, "531.3"). This is the version of WebKit the application 28 was compiled against. 30 This version is commonly used in WebKit based browsers as part 31 of the user agent string. Web servers and JavaScript might use 32 it to identify the presence of certain WebKit engine features 33 and behaviour. 29 34 35 The evolution of this version is bound to the releases of Apple's 36 Safari browser. For a version specific to the QtWebKit library, 37 see QTWEBKIT_VERSION 38 39 \sa QWebPage::userAgentForUrl() 30 40 */ 31 41 QString qWebKitVersion() … … 35 45 36 46 /*! 37 47 \relates QWebPage 48 \since 4.6 38 49 Returns the 'major' version number of WebKit at run-time as an integer 39 50 (for example, 531). This is the version of WebKit the application 40 51 was compiled against. 41 52 53 \sa qWebKitVersion() 42 54 */ 43 55 int qWebKitMajorVersion() … … 47 59 48 60 /*! 49 61 \relates QWebPage 62 \since 4.6 50 63 Returns the 'minor' version number of WebKit at run-time as an integer 51 64 (for example, 3). This is the version of WebKit the application 52 65 was compiled against. 53 66 67 \sa qWebKitVersion() 54 68 */ 55 69 int qWebKitMinorVersion() … … 57 71 return WEBKIT_MINOR_VERSION; 58 72 } 73 74 /*! 75 \macro QTWEBKIT_VERSION 76 \relates QWebPage 77 78 This macro expands a numeric value of the form 0xMMNNPP (MM = 79 major, NN = minor, PP = patch) that specifies QtWebKit's version 80 number. For example, if you compile your application against QtWebKit 81 2.1.2, the QTWEBKIT_VERSION macro will expand to 0x020102. 82 83 You can use QTWEBKIT_VERSION to use the latest QtWebKit API where 84 available. 85 86 \sa QT_VERSION 87 */ 88 89 /*! 90 \macro QTWEBKIT_VERSION_STR 91 \relates QWebPage 92 93 This macro expands to a string that specifies QtWebKit's version number 94 (for example, "2.1.2"). This is the version against which the 95 application is compiled. 96 97 \sa QTWEBKIT_VERSION 98 */ 99 100 /*! 101 \macro QTWEBKIT_VERSION_CHECK 102 \relates QWebPage 103 104 Turns the major, minor and patch numbers of a version into an 105 integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can 106 be compared with another similarly processed version id, for example 107 in a preprocessor statement: 108 109 \code 110 #if QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 1, 0) 111 // code to use API new in QtWebKit 2.1.0 112 #endif 113 \endcode 114 */ -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
r799 r846 33 33 #include "qwebkitversion.h" 34 34 35 #include "Chrome.h" 36 #include "ContextMenuController.h" 35 37 #include "Frame.h" 36 38 #include "FrameTree.h" … … 50 52 #include "SecurityOrigin.h" 51 53 #include "Settings.h" 54 #include "TiledBackingStore.h" 52 55 #include "Page.h" 53 56 #include "Pasteboard.h" … … 80 83 #include "PageGroup.h" 81 84 #include "QWebPageClient.h" 85 #include "WorkerThread.h" 82 86 83 87 #include <QApplication> … … 103 107 #include <QSysInfo> 104 108 #include <QTextCharFormat> 105 #i f QT_VERSION >= 0x040400109 #include <QTextDocument> 106 110 #include <QNetworkAccessManager> 107 111 #include <QNetworkRequest> 108 #else109 #include "qwebnetworkinterface.h"110 #endif111 112 #if defined(Q_WS_X11) 112 113 #include <QX11Info> 114 #endif 115 116 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 117 #include <QTouchEvent> 118 #include "PlatformTouchEvent.h" 113 119 #endif 114 120 … … 127 133 } 128 134 135 int QWEBKIT_EXPORT qt_drt_workerThreadCount() 136 { 137 #if ENABLE(WORKERS) 138 return WebCore::WorkerThread::workerThreadCount(); 139 #else 140 return 0; 141 #endif 142 } 143 129 144 bool QWebPagePrivate::drtRun = false; 130 145 void QWEBKIT_EXPORT qt_drt_run(bool b) … … 133 148 } 134 149 150 void QWEBKIT_EXPORT qt_drt_setFrameFlatteningEnabled(QWebPage* page, bool enabled) 151 { 152 QWebPagePrivate::core(page)->settings()->setFrameFlatteningEnabled(enabled); 153 } 154 135 155 void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName) 136 156 { … … 141 161 { 142 162 return page->handle()->page->groupName(); 163 } 164 165 #if ENABLE(INSPECTOR) 166 void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script) 167 { 168 if (!page->handle()->page->inspectorController()) 169 return; 170 page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script); 171 } 172 173 void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page) 174 { 175 if (!page->handle()->page->inspectorController()) 176 return; 177 page->handle()->page->inspectorController()->close(); 178 } 179 180 void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page) 181 { 182 if (!page->handle()->page->inspectorController()) 183 return; 184 page->handle()->page->inspectorController()->show(); 185 } 186 187 void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled) 188 { 189 InspectorController* controller = page->handle()->page->inspectorController(); 190 if (!controller) 191 return; 192 if (enabled) 193 controller->startTimelineProfiler(); 194 else 195 controller->stopTimelineProfiler(); 196 } 197 #endif 198 199 void QWEBKIT_EXPORT qt_drt_enableCaretBrowsing(QWebPage* page, bool value) 200 { 201 page->handle()->page->settings()->setCaretBrowsingEnabled(value); 143 202 } 144 203 … … 151 210 } 152 211 212 virtual bool isQWidgetClient() const { return true; } 213 153 214 virtual void scroll(int dx, int dy, const QRect&); 154 215 virtual void update(const QRect& dirtyRect); … … 167 228 virtual int screenNumber() const; 168 229 virtual QWidget* ownerWidget() const; 230 virtual QRect geometryRelativeToOwnerWidget() const; 169 231 170 232 virtual QObject* pluginParent() const; 233 234 virtual QStyle* style() const; 235 236 virtual bool viewResizesToContentsEnabled() const { return false; } 171 237 172 238 QWidget* view; … … 222 288 { 223 289 #if defined(Q_WS_X11) 224 if (view) 225 return view->x11Info().screen(); 226 #endif 227 290 return view->x11Info().screen(); 291 #endif 228 292 return 0; 229 293 } … … 234 298 } 235 299 300 QRect QWebPageWidgetClient::geometryRelativeToOwnerWidget() const 301 { 302 return view->geometry(); 303 } 304 236 305 QObject* QWebPageWidgetClient::pluginParent() const 237 306 { 238 307 return view; 308 } 309 310 QStyle* QWebPageWidgetClient::style() const 311 { 312 return view->style(); 239 313 } 240 314 … … 342 416 if (actions & Qt::CopyAction) 343 417 result |= DragOperationCopy; 418 // DragOperationgeneric represents InternetExplorer's equivalent of Move operation, 419 // hence it should be considered as "move" 344 420 if (actions & Qt::MoveAction) 345 result |= DragOperationMove;421 result |= (DragOperationMove | DragOperationGeneric); 346 422 if (actions & Qt::LinkAction) 347 423 result |= DragOperationLink; … … 356 432 else if (actions & DragOperationMove) 357 433 result = Qt::MoveAction; 434 // DragOperationgeneric represents InternetExplorer's equivalent of Move operation, 435 // hence it should be considered as "move" 436 else if (actions & DragOperationGeneric) 437 result = Qt::MoveAction; 358 438 else if (actions & DragOperationLink) 359 439 result = Qt::LinkAction; … … 367 447 , view(0) 368 448 #endif 449 , clickCausedFocus(false) 450 , viewportSize(QSize(0, 0)) 369 451 , inspectorFrontend(0) 370 452 , inspector(0) 371 453 , inspectorIsInternalOnly(false) 372 , viewportSize(QSize(0, 0))373 , clickCausedFocus(false)374 454 { 375 455 WebCore::InitializeLoggingChannelsIfNecessary(); 376 456 JSC::initializeThreading(); 377 457 WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData); 458 #if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) 459 WebCore::Font::setCodePath(WebCore::Font::Complex); 460 #endif 378 461 379 462 chromeClient = new ChromeClientQt(q); … … 381 464 editorClient = new EditorClientQt(q); 382 465 page = new Page(chromeClient, contextMenuClient, editorClient, 383 new DragClientQt(q), new InspectorClientQt(q), 0 );466 new DragClientQt(q), new InspectorClientQt(q), 0, 0); 384 467 385 468 settings = new QWebSettings(page->settings()); … … 389 472 #endif 390 473 mainFrame = 0; 391 #if QT_VERSION < 0x040400392 networkInterface = 0;393 #else394 474 networkManager = 0; 395 #endif396 475 pluginFactory = 0; 397 476 insideOpenCall = false; … … 422 501 } 423 502 424 #if QT_VERSION < 0x040400 425 bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type) 503 WebCore::Page* QWebPagePrivate::core(QWebPage* page) 504 { 505 return page->d->page; 506 } 507 508 QWebPagePrivate* QWebPagePrivate::priv(QWebPage* page) 509 { 510 return page->d; 511 } 512 513 bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) 426 514 { 427 515 if (insideOpenCall … … 430 518 return q->acceptNavigationRequest(frame, request, type); 431 519 } 432 #else433 bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)434 {435 if (insideOpenCall436 && frame == mainFrame)437 return true;438 return q->acceptNavigationRequest(frame, request, type);439 }440 #endif441 520 442 521 void QWebPagePrivate::createMainFrame() … … 474 553 case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic; 475 554 case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline; 555 #if ENABLE(INSPECTOR) 476 556 case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement; 557 #endif 477 558 default: break; 478 559 } … … 484 565 const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions) 485 566 { 486 QMenu* menu = new QMenu(q->view()); 567 if (!client) 568 return 0; 569 570 QMenu* menu = new QMenu(client->ownerWidget()); 487 571 for (int i = 0; i < items->count(); ++i) { 488 572 const ContextMenuItem &item = items->at(i); … … 533 617 #endif // QT_NO_CONTEXTMENU 534 618 619 #ifndef QT_NO_ACTION 535 620 void QWebPagePrivate::_q_webActionTriggered(bool checked) 536 621 { … … 541 626 q->triggerAction(action, checked); 542 627 } 628 #endif // QT_NO_ACTION 543 629 544 630 void QWebPagePrivate::_q_cleanupLeakMessages() … … 552 638 void QWebPagePrivate::updateAction(QWebPage::WebAction action) 553 639 { 640 #ifdef QT_NO_ACTION 641 Q_UNUSED(action) 642 #else 554 643 QAction *a = actions[action]; 555 644 if (!a || !mainFrame) … … 611 700 if (a->isCheckable()) 612 701 a->setChecked(checked); 702 #endif // QT_NO_ACTION 613 703 } 614 704 … … 682 772 tripleClickTimer.stop(); 683 773 else 684 q-> QObject::timerEvent(ev);774 q->timerEvent(ev); 685 775 } 686 776 … … 992 1082 { QKeySequence::DeleteStartOfWord, QWebPage::DeleteStartOfWord }, 993 1083 { QKeySequence::DeleteEndOfWord, QWebPage::DeleteEndOfWord }, 994 #if QT_VERSION >= 0x040500995 1084 { QKeySequence::InsertParagraphSeparator, QWebPage::InsertParagraphSeparator }, 996 1085 { QKeySequence::InsertLineSeparator, QWebPage::InsertLineSeparator }, 997 #endif998 1086 { QKeySequence::SelectAll, QWebPage::SelectAll }, 999 1087 { QKeySequence::UnknownKey, QWebPage::NoWebAction } … … 1020 1108 handled = true; 1021 1109 QFont defaultFont; 1022 if ( q->view())1023 defaultFont = q->view()->font();1110 if (client) 1111 defaultFont = client->ownerWidget()->font(); 1024 1112 QFontMetrics fm(defaultFont); 1025 1113 if (!handleScrolling(ev, frame)) { … … 1080 1168 // focusInEvent() we can re-activate the frame. 1081 1169 FocusController *focusController = page->focusController(); 1170 // Call setFocused first so that window.onblur doesn't get called twice 1171 focusController->setFocused(false); 1082 1172 focusController->setActive(false); 1083 focusController->setFocused(false);1084 1173 } 1085 1174 … … 1092 1181 ev->setDropAction(action); 1093 1182 if (action != Qt::IgnoreAction) 1094 ev->accept ();1183 ev->acceptProposedAction(); 1095 1184 #endif 1096 1185 } … … 1103 1192 Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData)); 1104 1193 ev->setDropAction(action); 1105 if (action != Qt::IgnoreAction) 1106 ev->accept(); 1194 // We must accept this event in order to receive the drag move events that are sent 1195 // while the drag and drop action is in progress. 1196 ev->acceptProposedAction(); 1107 1197 #endif 1108 1198 } … … 1134 1224 ev->setDropAction(action); 1135 1225 if (action != Qt::IgnoreAction) 1136 ev->accept ();1226 ev->acceptProposedAction(); 1137 1227 #endif 1138 1228 } … … 1144 1234 dropActionToDragOp(ev->possibleActions())); 1145 1235 Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData)); 1236 m_lastDropAction = action; 1146 1237 ev->setDropAction(action); 1147 if (action != Qt::IgnoreAction) 1148 ev->accept(); 1238 // We must accept this event in order to receive the drag move events that are sent 1239 // while the drag and drop action is in progress. 1240 ev->acceptProposedAction(); 1149 1241 #endif 1150 1242 } … … 1155 1247 DragData dragData(ev->mimeData(), ev->pos().toPoint(), 1156 1248 QCursor::pos(), dropActionToDragOp(ev->possibleActions())); 1157 Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData)); 1158 if (action != Qt::IgnoreAction) 1159 ev->accept(); 1249 if (page->dragController()->performDrag(&dragData)) 1250 ev->acceptProposedAction(); 1160 1251 #endif 1161 1252 } … … 1164 1255 { 1165 1256 #ifndef QT_NO_DRAGANDDROP 1257 // Overwrite the defaults set by QDragManager::defaultAction() 1258 ev->setDropAction(m_lastDropAction); 1166 1259 DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(), 1167 dropActionToDragOp(ev->possibleActions())); 1168 Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData)); 1169 if (action != Qt::IgnoreAction) 1170 ev->accept(); 1260 dropActionToDragOp(Qt::DropAction(ev->dropAction()))); 1261 if (page->dragController()->performDrag(&dragData)) 1262 ev->acceptProposedAction(); 1171 1263 #endif 1172 1264 } … … 1209 1301 WebCore::Frame *frame = page->focusController()->focusedOrMainFrame(); 1210 1302 WebCore::Editor *editor = frame->editor(); 1303 #if QT_VERSION >= 0x040600 1304 QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant()); 1305 #endif 1211 1306 1212 1307 if (!editor->canEdit()) { … … 1225 1320 1226 1321 Vector<CompositionUnderline> underlines; 1322 bool hasSelection = false; 1227 1323 1228 1324 for (int i = 0; i < ev->attributes().size(); ++i) { … … 1232 1328 QTextCharFormat textCharFormat = a.value.value<QTextFormat>().toCharFormat(); 1233 1329 QColor qcolor = textCharFormat.underlineColor(); 1234 underlines.append(CompositionUnderline( a.start, a.length, Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false));1330 underlines.append(CompositionUnderline(qMin(a.start, (a.start + a.length)), qMax(a.start, (a.start + a.length)), Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false)); 1235 1331 break; 1236 1332 } 1237 1333 case QInputMethodEvent::Cursor: { 1238 frame->se tCaretVisible(a.length); //if length is 0 cursor is invisible1334 frame->selection()->setCaretVisible(a.length); //if length is 0 cursor is invisible 1239 1335 if (a.length > 0) { 1240 1336 RenderObject* caretRenderer = frame->selection()->caretRenderer(); … … 1248 1344 #if QT_VERSION >= 0x040600 1249 1345 case QInputMethodEvent::Selection: { 1250 if (renderTextControl) { 1251 renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length))); 1252 renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length))); 1346 selection = a; 1347 hasSelection = true; 1348 break; 1349 } 1350 #endif 1351 } 1352 } 1353 1354 if (renderTextControl && ev->replacementLength() > 0) { 1355 renderTextControl->setSelectionStart(qMax(renderTextControl->selectionStart() + ev->replacementStart(), 0)); 1356 renderTextControl->setSelectionEnd(qMin(renderTextControl->selectionStart() + ev->replacementLength(), static_cast<int>(renderTextControl->text().length()))); 1357 // Commit regardless of whether commitString is empty, to get rid of selection. 1358 editor->confirmComposition(ev->commitString()); 1359 } else if (!ev->commitString().isEmpty()) { 1360 editor->confirmComposition(ev->commitString()); 1361 } 1362 // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition 1363 // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text 1364 // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text 1365 // 4. otherwise event is updating supplied pre-edit text 1366 QString preedit = ev->preeditString(); 1367 #if QT_VERSION >= 0x040600 1368 if (hasSelection) { 1369 QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString(); 1370 if (preedit.isEmpty() && selection.start + selection.length > 0) 1371 preedit = text; 1372 editor->setComposition(preedit, underlines, 1373 (selection.length < 0) ? selection.start + selection.length : selection.start, 1374 (selection.length < 0) ? selection.start : selection.start + selection.length); 1375 } else 1376 #endif 1377 editor->setComposition(preedit, underlines, preedit.length(), 0); 1378 1379 ev->accept(); 1380 } 1381 1382 #ifndef QT_NO_PROPERTIES 1383 typedef struct { 1384 const char* name; 1385 double deferredRepaintDelay; 1386 double initialDeferredRepaintDelayDuringLoading; 1387 double maxDeferredRepaintDelayDuringLoading; 1388 double deferredRepaintDelayIncrementDuringLoading; 1389 } QRepaintThrottlingPreset; 1390 1391 void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event) 1392 { 1393 if (event->propertyName() == "_q_viewMode") { 1394 QString mode = q->property("_q_viewMode").toString(); 1395 if (mode != viewMode) { 1396 viewMode = mode; 1397 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1398 WebCore::FrameView* view = frame->view(); 1399 frame->document()->updateStyleSelector(); 1400 view->forceLayout(); 1401 } 1402 } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") { 1403 int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt(); 1404 q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize); 1405 } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") { 1406 double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble(); 1407 q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay); 1408 } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelay") { 1409 double p = q->property("_q_RepaintThrottlingDeferredRepaintDelay").toDouble(); 1410 FrameView::setRepaintThrottlingDeferredRepaintDelay(p); 1411 } else if (event->propertyName() == "_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading") { 1412 double p = q->property("_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading").toDouble(); 1413 FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(p); 1414 } else if (event->propertyName() == "_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading") { 1415 double p = q->property("_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading").toDouble(); 1416 FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(p); 1417 } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading") { 1418 double p = q->property("_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading").toDouble(); 1419 FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(p); 1420 } else if (event->propertyName() == "_q_RepaintThrottlingPreset") { 1421 static const QRepaintThrottlingPreset presets[] = { 1422 { "NoThrottling", 0, 0, 0, 0 }, 1423 { "Legacy", 0.025, 0, 2.5, 0.5 }, 1424 { "Minimal", 0.01, 0, 1, 0.2 }, 1425 { "Medium", 0.025, 1, 5, 0.5 }, 1426 { "Heavy", 0.1, 2, 10, 1 } 1427 }; 1428 1429 QString p = q->property("_q_RepaintThrottlingPreset").toString(); 1430 for(int i = 0; i < sizeof(presets) / sizeof(presets[0]); i++) { 1431 if(p == presets[i].name) { 1432 FrameView::setRepaintThrottlingDeferredRepaintDelay( 1433 presets[i].deferredRepaintDelay); 1434 FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading( 1435 presets[i].initialDeferredRepaintDelayDuringLoading); 1436 FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading( 1437 presets[i].maxDeferredRepaintDelayDuringLoading); 1438 FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading( 1439 presets[i].deferredRepaintDelayIncrementDuringLoading); 1440 break; 1253 1441 } 1254 break;1255 1442 } 1256 #endif 1257 } 1258 } 1259 1260 if (!ev->commitString().isEmpty()) 1261 editor->confirmComposition(ev->commitString()); 1262 else if (!ev->preeditString().isEmpty()) { 1263 QString preedit = ev->preeditString(); 1264 editor->setComposition(preedit, underlines, preedit.length(), 0); 1265 } 1266 ev->accept(); 1267 } 1443 } 1444 #if ENABLE(TILED_BACKING_STORE) 1445 else if (event->propertyName() == "_q_TiledBackingStoreTileSize") { 1446 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1447 if (!frame->tiledBackingStore()) 1448 return; 1449 QSize tileSize = q->property("_q_TiledBackingStoreTileSize").toSize(); 1450 frame->tiledBackingStore()->setTileSize(tileSize); 1451 } else if (event->propertyName() == "_q_TiledBackingStoreTileCreationDelay") { 1452 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1453 if (!frame->tiledBackingStore()) 1454 return; 1455 int tileCreationDelay = q->property("_q_TiledBackingStoreTileCreationDelay").toInt(); 1456 frame->tiledBackingStore()->setTileCreationDelay(static_cast<double>(tileCreationDelay) / 1000.); 1457 } else if (event->propertyName() == "_q_TiledBackingStoreKeepAreaMultiplier") { 1458 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1459 if (!frame->tiledBackingStore()) 1460 return; 1461 FloatSize keepMultiplier; 1462 FloatSize coverMultiplier; 1463 frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); 1464 QSizeF qSize = q->property("_q_TiledBackingStoreKeepAreaMultiplier").toSizeF(); 1465 keepMultiplier = FloatSize(qSize.width(), qSize.height()); 1466 frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); 1467 } else if (event->propertyName() == "_q_TiledBackingStoreCoverAreaMultiplier") { 1468 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1469 if (!frame->tiledBackingStore()) 1470 return; 1471 FloatSize keepMultiplier; 1472 FloatSize coverMultiplier; 1473 frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); 1474 QSizeF qSize = q->property("_q_TiledBackingStoreCoverAreaMultiplier").toSizeF(); 1475 coverMultiplier = FloatSize(qSize.width(), qSize.height()); 1476 frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); 1477 } 1478 #endif 1479 } 1480 #endif 1268 1481 1269 1482 void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event) … … 1314 1527 direction = ScrollDown; 1315 1528 } else if (ev == QKeySequence::MoveToPreviousPage 1316 || ( ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier)) {1529 || ((ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier))) { 1317 1530 granularity = ScrollByPage; 1318 1531 direction = ScrollUp; 1319 1532 } else 1320 1533 #endif // QT_NO_SHORTCUT 1321 if ( ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier1534 if ((ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier) 1322 1535 || ev->key() == Qt::Key_Home) { 1323 1536 granularity = ScrollByDocument; 1324 1537 direction = ScrollUp; 1325 } else if ( ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier1538 } else if ((ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier) 1326 1539 || ev->key() == Qt::Key_End) { 1327 1540 granularity = ScrollByDocument; … … 1353 1566 } 1354 1567 1568 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 1569 void QWebPagePrivate::touchEvent(QTouchEvent* event) 1570 { 1571 WebCore::Frame* frame = QWebFramePrivate::core(mainFrame); 1572 if (!frame->view()) 1573 return; 1574 1575 bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event)); 1576 event->setAccepted(accepted); 1577 } 1578 #endif 1579 1355 1580 /*! 1356 1581 This method is used by the input method to query a set of properties of the page … … 1381 1606 switch (property) { 1382 1607 case Qt::ImMicroFocus: { 1383 return QVariant(frame->selection()->absoluteCaretBounds()); 1608 WebCore::FrameView* view = frame->view(); 1609 if (view && view->needsLayout()) { 1610 // We can't access absoluteCaretBounds() while the view needs to layout. 1611 return QVariant(); 1612 } 1613 return QVariant(view->contentsToWindow(frame->selection()->absoluteCaretBounds())); 1384 1614 } 1385 1615 case Qt::ImFont: { … … 1396 1626 return QVariant(renderTextControl->selectionEnd() - TextIterator::rangeLength(range.get())); 1397 1627 } 1398 return QVariant( renderTextControl->selectionEnd());1628 return QVariant(frame->selection()->extent().offsetInContainerNode()); 1399 1629 } 1400 1630 return QVariant(); … … 1428 1658 return QVariant(renderTextControl->selectionStart() - TextIterator::rangeLength(range.get())); 1429 1659 } 1430 return QVariant( renderTextControl->selectionStart());1660 return QVariant(frame->selection()->base().offsetInContainerNode()); 1431 1661 } 1432 1662 return QVariant(); … … 1479 1709 QWebInspector* QWebPagePrivate::getOrCreateInspector() 1480 1710 { 1711 #if ENABLE(INSPECTOR) 1481 1712 if (!inspector) { 1482 1713 QWebInspector* insp = new QWebInspector; … … 1486 1717 Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q) 1487 1718 } 1719 #endif 1488 1720 return inspector; 1489 1721 } … … 1492 1724 InspectorController* QWebPagePrivate::inspectorController() 1493 1725 { 1726 #if ENABLE(INSPECTOR) 1494 1727 return page->inspectorController(); 1728 #else 1729 return 0; 1730 #endif 1495 1731 } 1496 1732 … … 1499 1735 \enum QWebPage::FindFlag 1500 1736 1501 This enum describes the options available to QWebPage'sfindText() function. The options1737 This enum describes the options available to the findText() function. The options 1502 1738 can be OR-ed together from the following list: 1503 1739 … … 1520 1756 local filesystem or an equivalent - such as the Qt resource system - then linkClicked() is emitted. 1521 1757 \value DelegateAllLinks Whenever a link is activated the linkClicked() signal is emitted. 1758 1759 \sa QWebPage::linkDelegationPolicy 1522 1760 */ 1523 1761 … … 1534 1772 \value NavigationTypeFormResubmitted An HTML form was submitted a second time. 1535 1773 \value NavigationTypeOther A navigation to another document using a method not listed above. 1774 1775 \sa acceptNavigationRequest() 1536 1776 */ 1537 1777 … … 1543 1783 Actions only have an effect when they are applicable. The availability of 1544 1784 actions can be be determined by checking \l{QAction::}{isEnabled()} on the 1545 action returned by \l{QWebPage::}{action()}.1785 action returned by action(). 1546 1786 1547 1787 One method of enabling the text editing, cursor movement, and text selection actions … … 1560 1800 \value Forward Navigate forward in the history of navigated links. 1561 1801 \value Stop Stop loading the current page. 1802 \value StopScheduledPageRefresh Stop all pending page refresh/redirect requests. 1562 1803 \value Reload Reload the current page. 1563 1804 \value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6) … … 1625 1866 \enum QWebPage::WebWindowType 1626 1867 1868 This enum describes the types of window that can be created by the createWindow() function. 1869 1627 1870 \value WebBrowserWindow The window is a regular web browser window. 1628 1871 \value WebModalDialog The window acts as modal dialog. … … 1641 1884 1642 1885 QWebPage's API is very similar to QWebView, as you are still provided with 1643 common functions like action() (known as \l{QWebView::}{pageAction()} in 1644 QWebView), triggerAction(), findText() and settings(). More QWebView-like 1645 functions can be found in the main frame of QWebPage, obtained via 1646 QWebPage::mainFrame(). For example, the load(), setUrl() and setHtml() 1647 unctions for QWebPage can be accessed using QWebFrame. 1886 common functions like action() (known as 1887 \l{QWebView::pageAction()}{pageAction}() in QWebView), triggerAction(), 1888 findText() and settings(). More QWebView-like functions can be found in the 1889 main frame of QWebPage, obtained via the mainFrame() function. For example, 1890 the \l{QWebFrame::load()}{load}(), \l{QWebFrame::setUrl()}{setUrl}() and 1891 \l{QWebFrame::setHtml()}{setHtml}() functions for QWebPage can be accessed 1892 using QWebFrame. 1648 1893 1649 1894 The loadStarted() signal is emitted when the page begins to load.The 1650 1895 loadProgress() signal, on the other hand, is emitted whenever an element 1651 1896 of the web page completes loading, such as an embedded image, a script, 1652 etc. Finally, the loadFinished() signal is emitted when the page has 1653 loaded completely. Its argument, either true or false, indicates whether 1654 or not the load operation succeeded. 1897 etc. Finally, the loadFinished() signal is emitted when the page contents 1898 are loaded completely, independent of script execution or page rendering. 1899 Its argument, either true or false, indicates whether or not the load 1900 operation succeeded. 1655 1901 1656 1902 \section1 Using QWebPage in a Widget-less Environment … … 1692 1938 , d(new QWebPagePrivate(this)) 1693 1939 { 1694 setView(qobject_cast<QWidget 1940 setView(qobject_cast<QWidget*>(parent)); 1695 1941 1696 1942 connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int))); … … 1749 1995 \since 4.6 1750 1996 1751 Returns the frame at the given point \a pos. 1997 Returns the frame at the given point \a pos, or 0 if there is no frame at 1998 that position. 1752 1999 1753 2000 \sa mainFrame(), currentFrame() … … 1776 2023 \sa view() 1777 2024 */ 1778 void QWebPage::setView(QWidget *view) 1779 { 1780 if (this->view() != view) { 1781 d->view = view; 1782 if (!view) { 1783 delete d->client; 1784 d->client = 0; 1785 } else { 1786 if (!d->client) 1787 d->client = new QWebPageWidgetClient(view); 1788 else 1789 static_cast<QWebPageWidgetClient*>(d->client)->view = view; 1790 } 1791 setViewportSize(view ? view->size() : QSize(0, 0)); 1792 } 2025 void QWebPage::setView(QWidget* view) 2026 { 2027 if (this->view() == view) 2028 return; 2029 2030 d->view = view; 2031 setViewportSize(view ? view->size() : QSize(0, 0)); 2032 2033 // If we have no client, we install a special client delegating 2034 // the responsibility to the QWidget. This is the code path 2035 // handling a.o. the "legacy" QWebView. 2036 // 2037 // If such a special delegate already exist, we substitute the view. 2038 2039 if (d->client) { 2040 if (d->client->isQWidgetClient()) 2041 static_cast<QWebPageWidgetClient*>(d->client)->view = view; 2042 return; 2043 } 2044 2045 if (view) 2046 d->client = new QWebPageWidgetClient(view); 1793 2047 } 1794 2048 … … 1831 2085 Q_UNUSED(frame) 1832 2086 #ifndef QT_NO_MESSAGEBOX 1833 QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok); 2087 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 2088 QMessageBox::information(parent, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok); 1834 2089 #endif 1835 2090 } … … 1847 2102 return true; 1848 2103 #else 1849 return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No); 2104 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 2105 return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No); 1850 2106 #endif 1851 2107 } … … 1859 2115 user, the implementation should return true and the result string must not be null. 1860 2116 1861 The default implementation uses QInputDialog::getText .2117 The default implementation uses QInputDialog::getText(). 1862 2118 */ 1863 2119 bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result) … … 1866 2122 bool ok = false; 1867 2123 #ifndef QT_NO_INPUTDIALOG 1868 QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok); 2124 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 2125 QString x = QInputDialog::getText(parent, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok); 1869 2126 if (ok && result) 1870 2127 *result = x; … … 1891 2148 return false; 1892 2149 #else 1893 return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No); 2150 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 2151 return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No); 1894 2152 #endif 1895 2153 } … … 1904 2162 the request to QWebView's createWindow() function; otherwise it returns a null pointer. 1905 2163 2164 If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window. 2165 1906 2166 \sa acceptNavigationRequest() 1907 2167 */ 1908 2168 QWebPage *QWebPage::createWindow(WebWindowType type) 1909 2169 { 1910 QWebView *webView = qobject_cast<QWebView 2170 QWebView *webView = qobject_cast<QWebView*>(view()); 1911 2171 if (webView) { 1912 2172 QWebView *newView = webView->createWindow(type); … … 1918 2178 1919 2179 /*! 1920 This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin". 1921 The \a classid, \a url, \a paramNames and \a paramValues correspond to the HTML object element attributes and1922 c hild elements to configure the embeddable object.2180 This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin". It is 2181 called regardless of the value of QWebSettings::PluginsEnabled. The \a classid, \a url, \a paramNames and \a paramValues 2182 correspond to the HTML object element attributes and child elements to configure the embeddable object. 1923 2183 */ 1924 2184 QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) … … 1944 2204 frameLoadRequest(url, frame), features)) 1945 2205 newPage->chrome()->show(); 2206 } 2207 } 2208 2209 static void collectChildFrames(QWebFrame* frame, QList<QWebFrame*>& list) 2210 { 2211 list << frame->childFrames(); 2212 QListIterator<QWebFrame*> it(frame->childFrames()); 2213 while (it.hasNext()) { 2214 collectChildFrames(it.next(), list); 1946 2215 } 1947 2216 } … … 2034 2303 break; 2035 2304 case InspectElement: { 2305 #if ENABLE(INSPECTOR) 2036 2306 if (!d->hitTestResult.isNull()) { 2037 2307 d->getOrCreateInspector(); // Make sure the inspector is created … … 2039 2309 d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get()); 2040 2310 } 2311 #endif 2312 break; 2313 } 2314 case StopScheduledPageRefresh: { 2315 QWebFrame* topFrame = mainFrame(); 2316 topFrame->d->frame->redirectScheduler()->cancel(); 2317 QList<QWebFrame*> childFrames; 2318 collectChildFrames(topFrame, childFrames); 2319 QListIterator<QWebFrame*> it(childFrames); 2320 while (it.hasNext()) 2321 it.next()->d->frame->redirectScheduler()->cancel(); 2041 2322 break; 2042 2323 } … … 2067 2348 By default, for a newly-created Web page, this property contains a size with 2068 2349 zero width and height. 2350 2351 \sa QWebFrame::render(), preferredContentsSize 2069 2352 */ 2070 2353 void QWebPage::setViewportSize(const QSize &size) const … … 2076 2359 WebCore::FrameView* view = frame->d->frame->view(); 2077 2360 view->setFrameRect(QRect(QPoint(0, 0), size)); 2078 view->forceLayout();2079 2361 view->adjustViewSize(); 2080 2362 } … … 2096 2378 \property QWebPage::preferredContentsSize 2097 2379 \since 4.6 2098 \brief the size of the fixed layout 2099 2100 The size affects the layout of the page in the viewport. If set to a fixed size of 2101 1024x768 for example then webkit will layout the page as if the viewport were that size 2102 rather than something different. 2380 \brief the preferred size of the contents 2381 2382 If this property is set to a valid size, it is used to lay out the page. 2383 If it is not set (the default), the viewport size is used instead. 2384 2385 \sa viewportSize 2103 2386 */ 2104 2387 void QWebPage::setPreferredContentsSize(const QSize &size) const … … 2135 2418 \sa createWindow() 2136 2419 */ 2137 #if QT_VERSION >= 0x0404002138 2420 bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) 2139 #else2140 bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)2141 #endif2142 2421 { 2143 2422 Q_UNUSED(frame) … … 2175 2454 } 2176 2455 2456 #ifndef QT_NO_ACTION 2177 2457 /*! 2178 2458 Returns a QAction for the specified WebAction \a action. … … 2194 2474 QString text; 2195 2475 QIcon icon; 2196 QStyle *style = view() ? view()->style() : qApp->style();2476 QStyle *style = d->client ? d->client->style() : qApp->style(); 2197 2477 bool checkable = false; 2198 2478 … … 2227 2507 case Back: 2228 2508 text = contextMenuItemTagGoBack(); 2229 #if QT_VERSION >= 0x0404002230 2509 icon = style->standardIcon(QStyle::SP_ArrowBack); 2231 #endif2232 2510 break; 2233 2511 case Forward: 2234 2512 text = contextMenuItemTagGoForward(); 2235 #if QT_VERSION >= 0x0404002236 2513 icon = style->standardIcon(QStyle::SP_ArrowForward); 2237 #endif2238 2514 break; 2239 2515 case Stop: 2240 2516 text = contextMenuItemTagStop(); 2241 #if QT_VERSION >= 0x0404002242 2517 icon = style->standardIcon(QStyle::SP_BrowserStop); 2243 #endif2244 2518 break; 2245 2519 case Reload: 2246 2520 text = contextMenuItemTagReload(); 2247 #if QT_VERSION >= 0x0404002248 2521 icon = style->standardIcon(QStyle::SP_BrowserReload); 2249 #endif2250 2522 break; 2251 2523 … … 2455 2727 return a; 2456 2728 } 2729 #endif // QT_NO_ACTION 2457 2730 2458 2731 /*! 2459 2732 \property QWebPage::modified 2460 \brief whether the page contains unsubmitted form data 2733 \brief whether the page contains unsubmitted form data, or the contents have been changed. 2461 2734 2462 2735 By default, this property is false. 2736 2737 \sa contentsChanged(), contentEditable, undoStack() 2463 2738 */ 2464 2739 bool QWebPage::isModified() const … … 2476 2751 /*! 2477 2752 Returns a pointer to the undo stack used for editable content. 2753 2754 \sa modified 2478 2755 */ 2479 2756 QUndoStack *QWebPage::undoStack() const … … 2580 2857 d->leaveEvent(ev); 2581 2858 break; 2859 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 2860 case QEvent::TouchBegin: 2861 case QEvent::TouchUpdate: 2862 case QEvent::TouchEnd: 2863 d->touchEvent(static_cast<QTouchEvent*>(ev)); 2864 break; 2865 #endif 2866 #ifndef QT_NO_PROPERTIES 2867 case QEvent::DynamicPropertyChange: 2868 d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev)); 2869 break; 2870 #endif 2582 2871 default: 2583 2872 return QObject::event(ev); … … 2588 2877 2589 2878 /*! 2590 Similar to QWidget::focusNextPrevChild it focuses the next focusable web element2879 Similar to QWidget::focusNextPrevChild() it focuses the next focusable web element 2591 2880 if \a next is true; otherwise the previous element is focused. 2592 2881 … … 2615 2904 cursor. If disabled (the default) only HTML elements in the web page with their 2616 2905 \c{contenteditable} attribute set are editable. 2906 2907 \sa modified, contentsChanged(), WebAction 2617 2908 */ 2618 2909 void QWebPage::setContentEditable(bool editable) … … 2717 3008 void QWebPage::updatePositionDependentActions(const QPoint &pos) 2718 3009 { 3010 #ifndef QT_NO_ACTION 2719 3011 // First we disable all actions, but keep track of which ones were originally enabled. 2720 3012 QBitArray originallyEnabledWebActions(QWebPage::WebActionCount); … … 2726 3018 } 2727 3019 } 3020 #endif // QT_NO_ACTION 2728 3021 2729 3022 d->createMainFrame(); … … 2737 3030 WebCore::ContextMenu menu(result); 2738 3031 menu.populate(); 3032 3033 #if ENABLE(INSPECTOR) 2739 3034 if (d->page->inspectorController()->enabled()) 2740 3035 menu.addInspectElementItem(); 3036 #endif 2741 3037 2742 3038 QBitArray visitedWebActions(QWebPage::WebActionCount); … … 2749 3045 #endif // QT_NO_CONTEXTMENU 2750 3046 3047 #ifndef QT_NO_ACTION 2751 3048 // Finally, we restore the original enablement for the actions that were not put into the menu. 2752 3049 originallyEnabledWebActions &= ~visitedWebActions; // Mask out visited actions (they're part of the menu) … … 2757 3054 } 2758 3055 } 3056 #endif // QT_NO_ACTION 2759 3057 2760 3058 // This whole process ensures that any actions put into to the context menu has the right … … 2777 3075 file selection is allowed. 2778 3076 2779 \omitvalue ErrorPageExtension (introduced in Qt 4.6) 3077 \value ErrorPageExtension Whether the web page can provide an error page when loading fails. 3078 (introduced in Qt 4.6) 3079 3080 \sa ChooseMultipleFilesExtensionOption, ChooseMultipleFilesExtensionReturn, ErrorPageExtensionOption, ErrorPageExtensionReturn 2780 3081 */ 2781 3082 … … 2783 3084 \enum QWebPage::ErrorDomain 2784 3085 \since 4.6 2785 \internal 2786 2787 \value QtNetwork 2788 \value Http 2789 \value WebKit 3086 3087 This enum describes the domain of an ErrorPageExtensionOption object (i.e. the layer in which the error occurred). 3088 3089 \value QtNetwork The error occurred in the QtNetwork layer; the error code is of type QNetworkReply::NetworkError. 3090 \value Http The error occurred in the HTTP layer; the error code is a HTTP status code (see QNetworkRequest::HttpStatusCodeAttribute). 3091 \value WebKit The error is an internal WebKit error. 2790 3092 */ 2791 3093 … … 2797 3099 \inmodule QtWebKit 2798 3100 2799 \sa QWebPage::extension() 3101 \sa QWebPage::extension() QWebPage::ExtensionReturn 3102 */ 3103 3104 3105 /*! 3106 \class QWebPage::ExtensionReturn 3107 \since 4.4 3108 \brief The ExtensionReturn class provides an output result from a QWebPage's extension. 3109 3110 \inmodule QtWebKit 3111 3112 \sa QWebPage::extension() QWebPage::ExtensionOption 2800 3113 */ 2801 3114 … … 2808 3121 \inmodule QtWebKit 2809 3122 2810 The ErrorPageExtensionOption class holds the \a url for which an error occ oured as well as3123 The ErrorPageExtensionOption class holds the \a url for which an error occurred as well as 2811 3124 the associated \a frame. 2812 3125 2813 3126 The error itself is reported by an error \a domain, the \a error code as well as \a errorString. 2814 3127 2815 \sa QWebPage::ErrorPageExtensionReturn 3128 \sa QWebPage::extension() QWebPage::ErrorPageExtensionReturn 3129 */ 3130 3131 /*! 3132 \variable QWebPage::ErrorPageExtensionOption::url 3133 \brief the url for which an error occurred 3134 */ 3135 3136 /*! 3137 \variable QWebPage::ErrorPageExtensionOption::frame 3138 \brief the frame associated with the error 3139 */ 3140 3141 /*! 3142 \variable QWebPage::ErrorPageExtensionOption::domain 3143 \brief the domain that reported the error 3144 */ 3145 3146 /*! 3147 \variable QWebPage::ErrorPageExtensionOption::error 3148 \brief the error code. Interpretation of the value depends on the \a domain 3149 \sa QWebPage::ErrorDomain 3150 */ 3151 3152 /*! 3153 \variable QWebPage::ErrorPageExtensionOption::errorString 3154 \brief a string that describes the error 2816 3155 */ 2817 3156 … … 2834 3173 \a baseUrl. 2835 3174 2836 \sa QWebPage:: ErrorPageExtensionOption, QString::toUtf8()3175 \sa QWebPage::extension() QWebPage::ErrorPageExtensionOption, QString::toUtf8() 2837 3176 */ 2838 3177 … … 2841 3180 2842 3181 Constructs a new error page object. 3182 */ 3183 3184 3185 /*! 3186 \variable QWebPage::ErrorPageExtensionReturn::contentType 3187 \brief the error page's content type 3188 */ 3189 3190 /*! 3191 \variable QWebPage::ErrorPageExtensionReturn::encoding 3192 \brief the error page encoding 3193 */ 3194 3195 /*! 3196 \variable QWebPage::ErrorPageExtensionReturn::baseUrl 3197 \brief the base url 3198 3199 External objects such as stylesheets or images referenced in the HTML are located relative to this url. 3200 */ 3201 3202 /*! 3203 \variable QWebPage::ErrorPageExtensionReturn::content 3204 \brief the HTML content of the error page 2843 3205 */ 2844 3206 … … 2854 3216 and the suggested filenames which might be provided. 2855 3217 2856 \sa QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn 3218 \sa QWebPage::extension() QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn 3219 */ 3220 3221 /*! 3222 \variable QWebPage::ChooseMultipleFilesExtensionOption::parentFrame 3223 \brief The frame in which the request originated 3224 */ 3225 3226 /*! 3227 \variable QWebPage::ChooseMultipleFilesExtensionOption::suggestedFileNames 3228 \brief The suggested filenames 3229 */ 3230 3231 /*! 3232 \variable QWebPage::ChooseMultipleFilesExtensionReturn::fileNames 3233 \brief The selected filenames 2857 3234 */ 2858 3235 … … 2868 3245 when the extension is invoked. 2869 3246 2870 \sa QWebPage:: ChooseMultipleFilesExtensionOption3247 \sa QWebPage::extension() QWebPage::ChooseMultipleFilesExtensionOption 2871 3248 */ 2872 3249 … … 2875 3252 argument is provided as input to the extension; the output results can be stored in \a output. 2876 3253 2877 The behavior of this function is determined by \a extension. 3254 The behavior of this function is determined by \a extension. The \a option 3255 and \a output values are typically casted to the corresponding types (for 3256 example, ChooseMultipleFilesExtensionOption and 3257 ChooseMultipleFilesExtensionReturn for ChooseMultipleFilesExtension). 2878 3258 2879 3259 You can call supportsExtension() to check if an extension is supported by the page. … … 2889 3269 // FIXME: do not ignore suggestedFiles 2890 3270 QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames; 2891 QStringList names = QFileDialog::getOpenFileNames(view(), QString::null); 3271 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 3272 QStringList names = QFileDialog::getOpenFileNames(parent, QString::null); 2892 3273 static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names; 2893 3274 return true; … … 2940 3321 return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0); 2941 3322 } else { 3323 if (subString.isEmpty()) { 3324 d->page->mainFrame()->selection()->clear(); 3325 Frame* frame = d->page->mainFrame()->tree()->firstChild(); 3326 while (frame) { 3327 frame->selection()->clear(); 3328 frame = frame->tree()->traverseNextWithWrap(false); 3329 } 3330 } 2942 3331 ::FindDirection direction = ::FindDirectionForward; 2943 3332 if (options & FindBackward) … … 2966 3355 A suggested filename may be provided in \a suggestedFile. The frame originating the 2967 3356 request is provided as \a parentFrame. 3357 3358 \sa ChooseMultipleFilesExtension 2968 3359 */ 2969 3360 QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile) … … 2971 3362 Q_UNUSED(parentFrame) 2972 3363 #ifndef QT_NO_FILEDIALOG 2973 return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile); 3364 QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; 3365 return QFileDialog::getOpenFileName(parent, QString::null, suggestedFile); 2974 3366 #else 2975 3367 return QString::null; 2976 3368 #endif 2977 3369 } 2978 2979 #if QT_VERSION < 0x040400 && !defined qdoc2980 2981 void QWebPage::setNetworkInterface(QWebNetworkInterface *interface)2982 {2983 d->networkInterface = interface;2984 }2985 2986 QWebNetworkInterface *QWebPage::networkInterface() const2987 {2988 if (d->networkInterface)2989 return d->networkInterface;2990 else2991 return QWebNetworkInterface::defaultInterface();2992 }2993 2994 #ifndef QT_NO_NETWORKPROXY2995 void QWebPage::setNetworkProxy(const QNetworkProxy& proxy)2996 {2997 d->networkProxy = proxy;2998 }2999 3000 QNetworkProxy QWebPage::networkProxy() const3001 {3002 return d->networkProxy;3003 }3004 #endif3005 3006 #else3007 3370 3008 3371 /*! … … 3038 3401 return d->networkManager; 3039 3402 } 3040 3041 #endif3042 3403 3043 3404 /*! … … 3085 3446 \endlist 3086 3447 */ 3087 QString QWebPage::userAgentForUrl(const QUrl& url) const 3088 { 3089 Q_UNUSED(url) 3090 QString ua = QLatin1String("Mozilla/5.0 (" 3448 QString QWebPage::userAgentForUrl(const QUrl&) const 3449 { 3450 // splitting the string in three and user QStringBuilder is better than using QString::arg() 3451 static QString firstPart; 3452 static QString secondPart; 3453 static QString thirdPart; 3454 3455 if (firstPart.isNull() || secondPart.isNull() || thirdPart.isNull()) { 3456 QString firstPartTemp; 3457 firstPartTemp.reserve(150); 3458 firstPartTemp += QString::fromLatin1("Mozilla/5.0 (" 3091 3459 3092 3460 // Platform 3093 3461 #ifdef Q_WS_MAC 3094 "Macintosh"3462 "Macintosh" 3095 3463 #elif defined Q_WS_QWS 3096 "QtEmbedded"3464 "QtEmbedded" 3097 3465 #elif defined Q_WS_WIN 3098 "Windows"3466 "Windows" 3099 3467 #elif defined Q_WS_X11 3100 "X11"3468 "X11" 3101 3469 #elif defined Q_OS_SYMBIAN 3102 "Symbian"3470 "Symbian" 3103 3471 #elif defined Q_OS_OS2 3104 "OS/2"3472 "OS/2" 3105 3473 #else 3106 "Unknown" 3107 #endif 3108 // Placeholder for Platform Version 3109 "%1; " 3110 3111 // Placeholder for security strength (N or U) 3112 "%2; " 3113 3114 // Subplatform" 3474 "Unknown" 3475 #endif 3476 ); 3477 3478 #if defined Q_OS_SYMBIAN 3479 QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); 3480 switch (symbianVersion) { 3481 case QSysInfo::SV_9_2: 3482 firstPartTemp += QString::fromLatin1("OS/9.2"); 3483 break; 3484 case QSysInfo::SV_9_3: 3485 firstPartTemp += QString::fromLatin1("OS/9.3"); 3486 break; 3487 case QSysInfo::SV_9_4: 3488 firstPartTemp += QString::fromLatin1("OS/9.4"); 3489 break; 3490 case QSysInfo::SV_SF_2: 3491 firstPartTemp += QString::fromLatin1("/2"); 3492 break; 3493 case QSysInfo::SV_SF_3: 3494 firstPartTemp += QString::fromLatin1("/3"); 3495 break; 3496 case QSysInfo::SV_SF_4: 3497 firstPartTemp += QString::fromLatin1("/4"); 3498 default: 3499 break; 3500 } 3501 #endif 3502 3503 firstPartTemp += QString::fromLatin1("; "); 3504 3505 // SSL support 3506 #if !defined(QT_NO_OPENSSL) 3507 // we could check QSslSocket::supportsSsl() here, but this makes 3508 // OpenSSL, certificates etc being loaded in all cases were QWebPage 3509 // is used. This loading is not needed for non-https. 3510 firstPartTemp += QString::fromLatin1("U; "); 3511 // this may lead to a false positive: We indicate SSL since it is 3512 // compiled in even though supportsSsl() might return false 3513 #else 3514 firstPartTemp += QString::fromLatin1("N; "); 3515 #endif 3516 3517 // Operating system 3115 3518 #ifdef Q_OS_AIX 3116 "AIX"3519 firstPartTemp += QString::fromLatin1("AIX"); 3117 3520 #elif defined Q_OS_WIN32 3118 "%3" 3521 3522 switch (QSysInfo::WindowsVersion) { 3523 case QSysInfo::WV_32s: 3524 firstPartTemp += QString::fromLatin1("Windows 3.1"); 3525 break; 3526 case QSysInfo::WV_95: 3527 firstPartTemp += QString::fromLatin1("Windows 95"); 3528 break; 3529 case QSysInfo::WV_98: 3530 firstPartTemp += QString::fromLatin1("Windows 98"); 3531 break; 3532 case QSysInfo::WV_Me: 3533 firstPartTemp += QString::fromLatin1("Windows 98; Win 9x 4.90"); 3534 break; 3535 case QSysInfo::WV_NT: 3536 firstPartTemp += QString::fromLatin1("WinNT4.0"); 3537 break; 3538 case QSysInfo::WV_2000: 3539 firstPartTemp += QString::fromLatin1("Windows NT 5.0"); 3540 break; 3541 case QSysInfo::WV_XP: 3542 firstPartTemp += QString::fromLatin1("Windows NT 5.1"); 3543 break; 3544 case QSysInfo::WV_2003: 3545 firstPartTemp += QString::fromLatin1("Windows NT 5.2"); 3546 break; 3547 case QSysInfo::WV_VISTA: 3548 firstPartTemp += QString::fromLatin1("Windows NT 6.0"); 3549 break; 3550 case QSysInfo::WV_WINDOWS7: 3551 firstPartTemp += QString::fromLatin1("Windows NT 6.1"); 3552 break; 3553 case QSysInfo::WV_CE: 3554 firstPartTemp += QString::fromLatin1("Windows CE"); 3555 break; 3556 case QSysInfo::WV_CENET: 3557 firstPartTemp += QString::fromLatin1("Windows CE .NET"); 3558 break; 3559 case QSysInfo::WV_CE_5: 3560 firstPartTemp += QString::fromLatin1("Windows CE 5.x"); 3561 break; 3562 case QSysInfo::WV_CE_6: 3563 firstPartTemp += QString::fromLatin1("Windows CE 6.x"); 3564 break; 3565 } 3566 3567 #elifif defined Q_OS_OS2 3568 switch (QSysInfo::os2Version()) { 3569 default: 3570 case QSysInfo::OV_Unknown: 3571 firstPartTemp += QLatin1String("Unknown"); break; 3572 case QSysInfo::OV_2_0: 3573 firstPartTemp += QLatin1String("2.0"); break; 3574 case QSysInfo::OV_2_1: 3575 firstPartTemp += QLatin1String("2.1"); break; 3576 case QSysInfo::OV_2_11: 3577 firstPartTemp += QLatin1String("2.11"); break; 3578 case QSysInfo::OV_3_0: 3579 firstPartTemp += QLatin1String("Warp 3"); break; 3580 case QSysInfo::OV_4_0: 3581 firstPartTemp += QLatin1String("Warp 4"); break; 3582 case QSysInfo::OV_4_5: 3583 firstPartTemp += QLatin1String("Warp 4.5"); break; 3584 case QSysInfo::OV_4_52: 3585 firstPartTemp += QLatin1String("Warp 4.52"); break; 3586 case QSysInfo::OV_ECS_Unknown: 3587 firstPartTemp += QLatin1String("eCS"); break; 3588 case QSysInfo::OV_ECS_1_0: 3589 firstPartTemp += QLatin1String("eCS 1.0"); break; 3590 case QSysInfo::OV_ECS_1_1: 3591 firstPartTemp += QLatin1String("eCS 1.1"); break; 3592 case QSysInfo::OV_ECS_1_2: 3593 firstPartTemp += QLatin1String("eCS 1.2"); break; 3594 case QSysInfo::OV_ECS_2_0: 3595 firstPartTemp += QLatin1String("eCS 2.0"); break; 3596 } 3597 3119 3598 #elif defined Q_OS_DARWIN 3120 3599 #ifdef __i386__ || __x86_64__ 3121 "Intel Mac OS X"3600 firstPartTemp += QString::fromLatin1("Intel Mac OS X"); 3122 3601 #else 3123 "PPC Mac OS X"3602 firstPartTemp += QString::fromLatin1("PPC Mac OS X"); 3124 3603 #endif 3125 3604 3126 3605 #elif defined Q_OS_BSDI 3127 "BSD"3606 firstPartTemp += QString::fromLatin1("BSD"); 3128 3607 #elif defined Q_OS_BSD4 3129 "BSD Four"3608 firstPartTemp += QString::fromLatin1("BSD Four"); 3130 3609 #elif defined Q_OS_CYGWIN 3131 "Cygwin"3610 firstPartTemp += QString::fromLatin1("Cygwin"); 3132 3611 #elif defined Q_OS_DGUX 3133 "DG/UX"3612 firstPartTemp += QString::fromLatin1("DG/UX"); 3134 3613 #elif defined Q_OS_DYNIX 3135 "DYNIX/ptx"3614 firstPartTemp += QString::fromLatin1("DYNIX/ptx"); 3136 3615 #elif defined Q_OS_FREEBSD 3137 "FreeBSD"3616 firstPartTemp += QString::fromLatin1("FreeBSD"); 3138 3617 #elif defined Q_OS_HPUX 3139 "HP-UX"3618 firstPartTemp += QString::fromLatin1("HP-UX"); 3140 3619 #elif defined Q_OS_HURD 3141 "GNU Hurd"3620 firstPartTemp += QString::fromLatin1("GNU Hurd"); 3142 3621 #elif defined Q_OS_IRIX 3143 "SGI Irix"3622 firstPartTemp += QString::fromLatin1("SGI Irix"); 3144 3623 #elif defined Q_OS_LINUX 3145 "Linux" 3624 3625 #if defined(__x86_64__) 3626 firstPartTemp += QString::fromLatin1("Linux x86_64"); 3627 #elif defined(__i386__) 3628 firstPartTemp += QString::fromLatin1("Linux i686"); 3629 #else 3630 firstPartTemp += QString::fromLatin1("Linux"); 3631 #endif 3632 3146 3633 #elif defined Q_OS_LYNX 3147 "LynxOS"3634 firstPartTemp += QString::fromLatin1("LynxOS"); 3148 3635 #elif defined Q_OS_NETBSD 3149 "NetBSD"3636 firstPartTemp += QString::fromLatin1("NetBSD"); 3150 3637 #elif defined Q_OS_OS2 3151 "%3"3638 firstPartTemp += QString::fromLatin1("OS/2"); 3152 3639 #elif defined Q_OS_OPENBSD 3153 "OpenBSD"3640 firstPartTemp += QString::fromLatin1("OpenBSD"); 3154 3641 #elif defined Q_OS_OS2EMX 3155 "OS/2"3642 firstPartTemp += QString::fromLatin1("OS/2"); 3156 3643 #elif defined Q_OS_OSF 3157 "HP Tru64 UNIX"3644 firstPartTemp += QString::fromLatin1("HP Tru64 UNIX"); 3158 3645 #elif defined Q_OS_QNX6 3159 "QNX RTP Six"3646 firstPartTemp += QString::fromLatin1("QNX RTP Six"); 3160 3647 #elif defined Q_OS_QNX 3161 "QNX"3648 firstPartTemp += QString::fromLatin1("QNX"); 3162 3649 #elif defined Q_OS_RELIANT 3163 "Reliant UNIX"3650 firstPartTemp += QString::fromLatin1("Reliant UNIX"); 3164 3651 #elif defined Q_OS_SCO 3165 "SCO OpenServer"3652 firstPartTemp += QString::fromLatin1("SCO OpenServer"); 3166 3653 #elif defined Q_OS_SOLARIS 3167 "Sun Solaris"3654 firstPartTemp += QString::fromLatin1("Sun Solaris"); 3168 3655 #elif defined Q_OS_ULTRIX 3169 "DEC Ultrix" 3170 #elif defined Q_WS_S60 3171 "" 3656 firstPartTemp += QString::fromLatin1("DEC Ultrix"); 3657 #elif defined Q_OS_SYMBIAN 3658 firstPartTemp += QLatin1Char(' '); 3659 QSysInfo::S60Version s60Version = QSysInfo::s60Version(); 3660 switch (s60Version) { 3661 case QSysInfo::SV_S60_3_1: 3662 firstPartTemp += QString::fromLatin1("Series60/3.1"); 3663 break; 3664 case QSysInfo::SV_S60_3_2: 3665 firstPartTemp += QString::fromLatin1("Series60/3.2"); 3666 break; 3667 case QSysInfo::SV_S60_5_0: 3668 firstPartTemp += QString::fromLatin1("Series60/5.0"); 3669 break; 3670 default: 3671 break; 3672 } 3172 3673 #elif defined Q_OS_UNIX 3173 "UNIX BSD/SYSV system"3674 firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system"); 3174 3675 #elif defined Q_OS_UNIXWARE 3175 "UnixWare Seven, Open UNIX Eight"3676 firstPartTemp += QString::fromLatin1("UnixWare Seven, Open UNIX Eight"); 3176 3677 #else 3177 "Unknown" 3178 #endif 3179 // Placeholder for SubPlatform Version 3180 "%4; "); 3181 3182 // Platform Version 3183 QString osVer; 3184 #ifdef Q_OS_SYMBIAN 3185 QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); 3186 switch (symbianVersion) { 3187 case QSysInfo::SV_9_2: 3188 osVer = "OS/9.2"; 3189 break; 3190 case QSysInfo::SV_9_3: 3191 osVer = "OS/9.3"; 3192 break; 3193 case QSysInfo::SV_9_4: 3194 osVer = "OS/9.4"; 3195 break; 3196 case QSysInfo::SV_SF_2: 3197 osVer = "/2"; 3198 break; 3199 case QSysInfo::SV_SF_3: 3200 osVer = "/3"; 3201 break; 3202 case QSysInfo::SV_SF_4: 3203 osVer = "/4"; 3204 break; 3205 default: 3206 osVer = ""; 3207 } 3208 #endif 3209 ua = ua.arg(osVer); 3210 3211 QChar securityStrength(QLatin1Char('N')); 3212 #if !defined(QT_NO_OPENSSL) 3213 // we could check QSslSocket::supportsSsl() here, but this makes 3214 // OpenSSL, certificates etc being loaded in all cases were QWebPage 3215 // is used. This loading is not needed for non-https. 3216 securityStrength = QLatin1Char('U'); 3217 // this may lead to a false positive: We indicate SSL since it is 3218 // compiled in even though supportsSsl() might return false 3219 #endif 3220 ua = ua.arg(securityStrength); 3221 3222 #if defined Q_OS_WIN32 3223 QString ver; 3224 switch (QSysInfo::WindowsVersion) { 3225 case QSysInfo::WV_32s: 3226 ver = "Windows 3.1"; 3227 break; 3228 case QSysInfo::WV_95: 3229 ver = "Windows 95"; 3230 break; 3231 case QSysInfo::WV_98: 3232 ver = "Windows 98"; 3233 break; 3234 case QSysInfo::WV_Me: 3235 ver = "Windows 98; Win 9x 4.90"; 3236 break; 3237 case QSysInfo::WV_NT: 3238 ver = "WinNT4.0"; 3239 break; 3240 case QSysInfo::WV_2000: 3241 ver = "Windows NT 5.0"; 3242 break; 3243 case QSysInfo::WV_XP: 3244 ver = "Windows NT 5.1"; 3245 break; 3246 case QSysInfo::WV_2003: 3247 ver = "Windows NT 5.2"; 3248 break; 3249 case QSysInfo::WV_VISTA: 3250 ver = "Windows NT 6.0"; 3251 break; 3252 #if QT_VERSION > 0x040500 3253 case QSysInfo::WV_WINDOWS7: 3254 ver = "Windows NT 6.1"; 3255 break; 3256 #endif 3257 case QSysInfo::WV_CE: 3258 ver = "Windows CE"; 3259 break; 3260 case QSysInfo::WV_CENET: 3261 ver = "Windows CE .NET"; 3262 break; 3263 case QSysInfo::WV_CE_5: 3264 ver = "Windows CE 5.x"; 3265 break; 3266 case QSysInfo::WV_CE_6: 3267 ver = "Windows CE 6.x"; 3268 break; 3269 } 3270 ua = QString(ua).arg(ver); 3271 #endif 3272 3273 #if defined Q_OS_OS2 3274 QString ver; 3275 switch (QSysInfo::os2Version()) { 3276 default: 3277 case QSysInfo::OV_Unknown: 3278 ver = QLatin1String("Unknown"); break; 3279 case QSysInfo::OV_2_0: 3280 ver = QLatin1String("2.0"); break; 3281 case QSysInfo::OV_2_1: 3282 ver = QLatin1String("2.1"); break; 3283 case QSysInfo::OV_2_11: 3284 ver = QLatin1String("2.11"); break; 3285 case QSysInfo::OV_3_0: 3286 ver = QLatin1String("Warp 3"); break; 3287 case QSysInfo::OV_4_0: 3288 ver = QLatin1String("Warp 4"); break; 3289 case QSysInfo::OV_4_5: 3290 ver = QLatin1String("Warp 4.5"); break; 3291 case QSysInfo::OV_4_52: 3292 ver = QLatin1String("Warp 4.52"); break; 3293 case QSysInfo::OV_ECS_Unknown: 3294 ver = QLatin1String("eCS"); break; 3295 case QSysInfo::OV_ECS_1_0: 3296 ver = QLatin1String("eCS 1.0"); break; 3297 case QSysInfo::OV_ECS_1_1: 3298 ver = QLatin1String("eCS 1.1"); break; 3299 case QSysInfo::OV_ECS_1_2: 3300 ver = QLatin1String("eCS 1.2"); break; 3301 case QSysInfo::OV_ECS_2_0: 3302 ver = QLatin1String("eCS 2.0"); break; 3303 } 3304 ua = QString(ua).arg(ver); 3305 #endif 3306 3307 // SubPlatform Version 3308 QString subPlatformVer; 3309 #ifdef Q_WS_S60 3310 QSysInfo::S60Version s60Version = QSysInfo::s60Version(); 3311 switch (s60Version) { 3312 case QSysInfo::SV_S60_3_1: 3313 subPlatformVer = "Series60/3.1"; 3314 break; 3315 case QSysInfo::SV_S60_3_2: 3316 subPlatformVer = "Series60/3.2"; 3317 break; 3318 case QSysInfo::SV_S60_5_0: 3319 subPlatformVer = "Series60/5.0"; 3320 break; 3321 default: 3322 subPlatformVer = ""; 3323 } 3324 #endif 3325 ua = ua.arg(subPlatformVer); 3678 firstPartTemp += QString::fromLatin1("Unknown"); 3679 #endif 3680 3681 // language is the split 3682 firstPartTemp += QString::fromLatin1("; "); 3683 firstPartTemp.squeeze(); 3684 firstPart = firstPartTemp; 3685 3686 QString secondPartTemp; 3687 secondPartTemp.reserve(150); 3688 secondPartTemp += QString::fromLatin1(") "); 3689 3690 // webkit/qt version 3691 secondPartTemp += QString::fromLatin1("AppleWebKit/"); 3692 secondPartTemp += qWebKitVersion(); 3693 secondPartTemp += QString::fromLatin1(" (KHTML, like Gecko) "); 3694 3695 3696 // Application name split the third part 3697 secondPartTemp.squeeze(); 3698 secondPart = secondPartTemp; 3699 3700 QString thirdPartTemp; 3701 thirdPartTemp.reserve(150); 3702 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) 3703 thirdPartTemp += QLatin1String(" Mobile Safari/"); 3704 #else 3705 thirdPartTemp += QLatin1String(" Safari/"); 3706 #endif 3707 thirdPartTemp += qWebKitVersion(); 3708 thirdPartTemp.squeeze(); 3709 thirdPart = thirdPartTemp; 3710 Q_ASSERT(!firstPart.isNull()); 3711 Q_ASSERT(!secondPart.isNull()); 3712 Q_ASSERT(!thirdPart.isNull()); 3713 } 3326 3714 3327 3715 // Language 3328 QLocale locale; 3329 if (view()) 3330 locale = view()->locale(); 3331 QString name = locale.name(); 3332 name.replace(QLatin1Char('_'), QLatin1Char('-')); 3333 ua.append(name); 3334 ua.append(QLatin1String(") ")); 3335 3336 // webkit/qt version 3337 ua.append(QString(QLatin1String("AppleWebKit/%1 (KHTML, like Gecko) ")) 3338 .arg(QString(qWebKitVersion()))); 3716 QString languageName; 3717 if (d->client && d->client->ownerWidget()) 3718 languageName = d->client->ownerWidget()->locale().name(); 3719 else 3720 languageName = QLocale().name(); 3721 languageName.replace(QLatin1Char('_'), QLatin1Char('-')); 3339 3722 3340 3723 // Application name/version 3341 3724 QString appName = QCoreApplication::applicationName(); 3342 3725 if (!appName.isEmpty()) { 3343 ua.append(appName);3344 #if QT_VERSION >= 0x0404003345 3726 QString appVer = QCoreApplication::applicationVersion(); 3346 3727 if (!appVer.isEmpty()) 3347 ua.append(QLatin1Char('/') + appVer); 3348 #endif 3728 appName.append(QLatin1Char('/') + appVer); 3349 3729 } else { 3350 3730 // Qt version 3351 ua.append(QLatin1String("Qt/")); 3352 ua.append(QLatin1String(qVersion())); 3353 } 3354 3355 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) 3356 ua.append(QString(QLatin1String(" Mobile Safari/%1")) 3357 .arg(qWebKitVersion())); 3358 #else 3359 ua.append(QString(QLatin1String(" Safari/%1")) 3360 .arg(qWebKitVersion())); 3361 #endif 3362 3363 return ua; 3731 appName = QString::fromLatin1("Qt/") + QString::fromLatin1(qVersion()); 3732 } 3733 3734 return firstPart + languageName + secondPart + appName + thirdPart; 3364 3735 } 3365 3736 … … 3387 3758 Returns the number of bytes that were received from the network to render the current page. 3388 3759 3389 \sa totalBytes() 3760 \sa totalBytes(), loadProgress() 3390 3761 */ 3391 3762 quint64 QWebPage::bytesReceived() const … … 3397 3768 \fn void QWebPage::loadStarted() 3398 3769 3399 This signal is emitted when a new load of the page is started.3770 This signal is emitted when a page starts loading content. 3400 3771 3401 3772 \sa loadFinished() … … 3416 3787 \fn void QWebPage::loadFinished(bool ok) 3417 3788 3418 This signal is emitted when a load of the page is finished. 3789 This signal is emitted when the page finishes loading content. This signal 3790 is independant of script execution or page rendering. 3419 3791 \a ok will indicate whether the load was successful or any error occurred. 3420 3792 3421 \sa loadStarted() 3793 \sa loadStarted(), ErrorPageExtension 3422 3794 */ 3423 3795 … … 3446 3818 3447 3819 This signal is emitted whenever the page creates a new \a frame. 3820 3821 \sa currentFrame() 3448 3822 */ 3449 3823 … … 3451 3825 \fn void QWebPage::selectionChanged() 3452 3826 3453 This signal is emitted whenever the selection changes. 3827 This signal is emitted whenever the selection changes, either interactively 3828 or programmatically (e.g. by calling triggerAction() with a selection action). 3454 3829 3455 3830 \sa selectedText() … … 3463 3838 as well as other editable content. 3464 3839 3465 \sa contentEditable, QWebFrame::toHtml(), QWebFrame::toPlainText()3840 \sa contentEditable, modified, QWebFrame::toHtml(), QWebFrame::toPlainText() 3466 3841 */ 3467 3842 … … 3513 3888 \fn void QWebPage::unsupportedContent(QNetworkReply *reply) 3514 3889 3515 This signal is emitted when WebKit cannot handle a link the user navigated to. 3890 This signal is emitted when WebKit cannot handle a link the user navigated to or a 3891 web server's response includes a "Content-Disposition" header with the 'attachment' 3892 directive. If "Content-Disposition" is present in \a reply, the web server is indicating 3893 that the client should prompt the user to save the content regardless of content-type. 3894 See RFC 2616 sections 19.5.1 for details about Content-Disposition. 3516 3895 3517 3896 At signal emission time the meta-data of the QNetworkReply \a reply is available. … … 3535 3914 3536 3915 This signal is emitted when for example the position of the cursor in an editable form 3537 element changes. It is used inform input methods about the new on-screen position where3538 the user is able to enter text. This signal is usually connected to QWidget's updateMicroFocus()3539 slot.3916 element changes. It is used to inform input methods about the new on-screen position where 3917 the user is able to enter text. This signal is usually connected to the 3918 QWidget::updateMicroFocus() slot. 3540 3919 */ 3541 3920 … … 3578 3957 This signal is emitted whenever the web site shown in \a frame is asking to store data 3579 3958 to the database \a databaseName and the quota allocated to that web site is exceeded. 3959 3960 \sa QWebDatabase 3580 3961 */ 3581 3962 -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
r561 r846 55 55 class FrameLoaderClientQt; 56 56 class InspectorClientQt; 57 class InspectorFrontendClientQt; 57 58 class ResourceHandle; 58 59 class HitTestResult; … … 169 170 AlignRight, 170 171 172 StopScheduledPageRefresh, 173 171 174 WebActionCount 172 175 }; … … 209 212 #endif 210 213 211 #if QT_VERSION < 0x040400 && !defined(qdoc)212 void setNetworkInterface(QWebNetworkInterface *interface);213 QWebNetworkInterface *networkInterface() const;214 215 // #### why is this in the page itself?216 #ifndef QT_NO_NETWORKPROXY217 void setNetworkProxy(const QNetworkProxy& proxy);218 QNetworkProxy networkProxy() const;219 #endif220 221 #else222 214 void setNetworkAccessManager(QNetworkAccessManager *manager); 223 215 QNetworkAccessManager *networkAccessManager() const; 224 #endif225 216 226 217 void setPluginFactory(QWebPluginFactory *factory); … … 232 223 QString selectedText() const; 233 224 225 #ifndef QT_NO_ACTION 234 226 QAction *action(WebAction action) const; 227 #endif 235 228 virtual void triggerAction(WebAction action, bool checked = false); 236 229 … … 335 328 void menuBarVisibilityChangeRequested(bool visible); 336 329 337 #if QT_VERSION >= 0x040400338 330 void unsupportedContent(QNetworkReply *reply); 339 331 void downloadRequested(const QNetworkRequest &request); 340 #endif341 332 342 333 void microFocusChanged(); … … 351 342 virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); 352 343 353 #if QT_VERSION >= 0x040400354 344 virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); 355 #else356 virtual bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, NavigationType type);357 #endif358 345 virtual QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile); 359 346 virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg); … … 366 353 private: 367 354 Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int)) 355 #ifndef QT_NO_ACTION 368 356 Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked)) 357 #endif 369 358 Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages()) 370 359 … … 374 363 friend class QWebPagePrivate; 375 364 friend class QWebView; 365 friend class QWebViewPrivate; 376 366 friend class QGraphicsWebView; 367 friend class QGraphicsWebViewPrivate; 377 368 friend class QWebInspector; 378 369 friend class WebCore::ChromeClientQt; … … 380 371 friend class WebCore::FrameLoaderClientQt; 381 372 friend class WebCore::InspectorClientQt; 373 friend class WebCore::InspectorFrontendClientQt; 382 374 friend class WebCore::ResourceHandle; 383 375 friend class WebCore::QNetworkReplyHandler; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
r561 r846 63 63 QWebPagePrivate(QWebPage*); 64 64 ~QWebPagePrivate(); 65 66 static WebCore::Page* core(QWebPage*); 67 static QWebPagePrivate* priv(QWebPage*); 68 65 69 void createMainFrame(); 66 70 #ifndef QT_NO_CONTEXTMENU … … 109 113 void inputMethodEvent(QInputMethodEvent*); 110 114 115 #ifndef QT_NO_PROPERTIES 116 void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*); 117 #endif 118 111 119 void shortcutOverrideEvent(QKeyEvent*); 112 120 void leaveEvent(QEvent*); … … 114 122 void handleSoftwareInputPanel(Qt::MouseButton); 115 123 bool handleScrolling(QKeyEvent*, WebCore::Frame*); 124 125 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 126 void touchEvent(QTouchEvent*); 127 #endif 116 128 117 129 void setInspector(QWebInspector*); … … 152 164 bool clickCausedFocus; 153 165 154 #if QT_VERSION < 0x040400155 bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type);156 157 QWebNetworkInterface *networkInterface;158 #ifndef QT_NO_NETWORKPROXY159 QNetworkProxy networkProxy;160 #endif161 162 #else163 166 bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type); 164 167 QNetworkAccessManager *networkManager; 165 #endif166 168 167 169 bool forwardUnsupportedContent; … … 187 189 QWebInspector* inspector; 188 190 bool inspectorIsInternalOnly; // True if created through the Inspect context menu action 191 Qt::DropAction m_lastDropAction; 192 193 QString viewMode; 189 194 190 195 static bool drtRun; -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
r561 r846 24 24 \class QWebPluginFactory 25 25 \since 4.4 26 \brief The QWebPluginFactory class creates plugins to be embedded into web 27 pages. 28 29 \inmodule QtWebKit 30 31 QWebPluginFactory is a factory for creating plugins for QWebPage. A plugin 32 factory can be installed on a QWebPage using QWebPage::setPluginFactory(). 26 \brief The QWebPluginFactory class is used to embed custom data types in web pages. 27 28 \inmodule QtWebKit 29 30 The HTML \c{<object>} tag is used to embed arbitrary content into a web page, 31 for example: 32 33 \code 34 <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400"></object> 35 \endcode 36 37 QtWebkit will natively handle the most basic data types like \c{text/html} and 38 \c{image/jpeg}, but for any advanced or custom data types you will need to 39 provide a handler yourself. 40 41 QWebPluginFactory is a factory for creating plugins for QWebPage, where each 42 plugin provides support for one or more data types. A plugin factory can be 43 installed on a QWebPage using QWebPage::setPluginFactory(). 33 44 34 45 \note The plugin factory is only used if plugins are enabled through QWebSettings. 35 46 36 You canprovide a QWebPluginFactory by implementing the plugins() and the37 create() method . For plugins() it is necessary to describe the plugins the47 You provide a QWebPluginFactory by implementing the plugins() and the 48 create() methods. For plugins() it is necessary to describe the plugins the 38 49 factory can create, including a description and the supported MIME types. 39 50 The MIME types each plugin can handle should match the ones specified in 40 in the HTML \c{<object>} tag .51 in the HTML \c{<object>} tag of your content. 41 52 42 53 The create() method is called if the requested MIME type is supported. The 43 54 implementation has to return a new instance of the plugin requested for the 44 55 given MIME type and the specified URL. 56 57 The plugins themselves are subclasses of QObject, but currently only plugins 58 based on either QWidget or QGraphicsWidget are supported. 59 45 60 */ 46 61 … … 49 64 \class QWebPluginFactory::Plugin 50 65 \since 4.4 51 \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.66 \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create. 52 67 53 68 \inmodule QtWebKit … … 133 148 134 149 \note Currently, this function is only called when JavaScript programs 135 access the global \c plugins or \c mimetypes objects. 150 access the global \c plugins or \c mimetypes objects. 136 151 */ 137 152 … … 184 199 /*! 185 200 \enum QWebPluginFactory::Extension 201 \internal 186 202 187 203 This enum describes the types of extensions that the plugin factory can support. Before using these extensions, you … … 193 209 /*! 194 210 \class QWebPluginFactory::ExtensionOption 211 \internal 195 212 \since 4.4 196 213 \brief The ExtensionOption class provides an extended input argument to QWebPluginFactory's extension support. … … 203 220 /*! 204 221 \class QWebPluginFactory::ExtensionReturn 222 \internal 205 223 \since 4.4 206 224 \brief The ExtensionOption class provides an extended output argument to QWebPluginFactory's extension support. … … 214 232 This virtual function can be reimplemented in a QWebPluginFactory subclass to provide support for extensions. The \a option 215 233 argument is provided as input to the extension; the output results can be stored in \a output. 234 235 \internal 216 236 217 237 The behaviour of this function is determined by \a extension. … … 234 254 This virtual function returns true if the plugin factory supports \a extension; otherwise false is returned. 235 255 256 \internal 257 236 258 \sa extension() 237 259 */ -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
r561 r846 41 41 } 42 42 43 void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme) 44 { 45 SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); 46 } 47 43 48 /*! 44 49 \class QWebSecurityOrigin … … 58 63 \c{http://www.malicious.com/evil.html} from accessing \c{http://www.example.com/}'s resources, 59 64 because they are of a different security origin. 65 66 By default local schemes like \c{file://} and \c{qrc://} are concidered to be in the same 67 security origin, and can access each other's resources. You can add additional local schemes 68 by using QWebSecurityOrigin::addLocalScheme(), or override the default same-origin behavior 69 by setting QWebSettings::LocalContentCanAccessFileUrls to \c{false}. 70 71 \note Local resources are by default restricted from accessing remote content, which 72 means your \c{file://} will not be able to access \c{http://domain.com/foo.html}. You 73 can relax this restriction by setting QWebSettings::LocalContentCanAccessRemoteUrls to 74 \c{true}. 60 75 61 76 Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a … … 215 230 216 231 Adds the given \a scheme to the list of schemes that are considered equivalent 217 to the \c file: scheme. They are not subject to cross domain restrictions. 232 to the \c file: scheme. 233 234 Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls 235 and QWebSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be 236 in the same security origin, and local schemes can not access remote content. 218 237 */ 219 238 void QWebSecurityOrigin::addLocalScheme(const QString& scheme) … … 227 246 Removes the given \a scheme from the list of local schemes. 228 247 248 \note You can not remove the \c{file://} scheme from the list 249 of local schemes. 250 229 251 \sa addLocalScheme() 230 252 */ … … 236 258 /*! 237 259 \since 4.6 238 Returns a list of all the schemes that were set by the application as local schemes, 260 Returns a list of all the schemes concidered to be local. 261 262 By default this is \c{file://} and \c{qrc://}. 263 239 264 \sa addLocalScheme(), removeLocalScheme() 240 265 */ -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
r561 r846 27 27 #include "Cache.h" 28 28 #include "CrossOriginPreflightResultCache.h" 29 #include "Database.h" 29 30 #include "FontCache.h" 30 31 #include "Page.h" … … 48 49 #include <QFileInfo> 49 50 50 #if ENABLE(QT_BEARER)51 51 #include "NetworkStateNotifier.h" 52 #endif53 52 54 53 void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed) … … 91 90 hash->insert(QWebSettings::DefaultFrameIconGraphic, QPixmap(QLatin1String(":webkit/resources/urlIcon.png"))); 92 91 hash->insert(QWebSettings::TextAreaSizeGripCornerGraphic, QPixmap(QLatin1String(":webkit/resources/textAreaResizeCorner.png"))); 92 hash->insert(QWebSettings::DeleteButtonGraphic, QPixmap(QLatin1String(":webkit/resources/deleteButton.png"))); 93 93 } 94 94 … … 152 152 global->attributes.value(QWebSettings::JavascriptEnabled)); 153 153 settings->setJavaScriptEnabled(value); 154 154 #if USE(ACCELERATED_COMPOSITING) 155 value = attributes.value(QWebSettings::AcceleratedCompositingEnabled, 156 global->attributes.value(QWebSettings::AcceleratedCompositingEnabled)); 157 158 settings->setAcceleratedCompositingEnabled(value); 159 #endif 160 #if ENABLE(3D_CANVAS) 161 value = attributes.value(QWebSettings::WebGLEnabled, 162 global->attributes.value(QWebSettings::WebGLEnabled)); 163 164 settings->setWebGLEnabled(value); 165 #endif 166 155 167 value = attributes.value(QWebSettings::JavascriptCanOpenWindows, 156 168 global->attributes.value(QWebSettings::JavascriptCanOpenWindows)); … … 169 181 settings->setPrivateBrowsingEnabled(value); 170 182 183 value = attributes.value(QWebSettings::SpatialNavigationEnabled, 184 global->attributes.value(QWebSettings::SpatialNavigationEnabled)); 185 settings->setSpatialNavigationEnabled(value); 186 171 187 value = attributes.value(QWebSettings::JavascriptCanAccessClipboard, 172 188 global->attributes.value(QWebSettings::JavascriptCanAccessClipboard)); 173 189 settings->setDOMPasteAllowed(value); 190 settings->setJavaScriptCanAccessClipboard(value); 174 191 175 192 value = attributes.value(QWebSettings::DeveloperExtrasEnabled, … … 177 194 settings->setDeveloperExtrasEnabled(value); 178 195 196 value = attributes.value(QWebSettings::FrameFlatteningEnabled, 197 global->attributes.value(QWebSettings::FrameFlatteningEnabled)); 198 settings->setFrameFlatteningEnabled(value); 199 179 200 QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation; 180 201 settings->setUserStyleSheetLocation(WebCore::KURL(location)); … … 188 209 value = attributes.value(QWebSettings::ZoomTextOnly, 189 210 global->attributes.value(QWebSettings::ZoomTextOnly)); 190 settings->setZoom sTextOnly(value);211 settings->setZoomMode(value ? WebCore::ZoomTextOnly : WebCore::ZoomPage); 191 212 192 213 value = attributes.value(QWebSettings::PrintElementBackgrounds, … … 194 215 settings->setShouldPrintBackgrounds(value); 195 216 217 #if ENABLE(DATABASE) 196 218 value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled, 197 219 global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled)); 198 settings->setDatabasesEnabled(value); 220 WebCore::Database::setIsAvailable(value); 221 #endif 199 222 200 223 value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled, … … 204 227 value = attributes.value(QWebSettings::LocalStorageEnabled, 205 228 global->attributes.value(QWebSettings::LocalStorageEnabled)); 206 207 229 settings->setLocalStorageEnabled(value); 208 230 … … 210 232 global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); 211 233 settings->setAllowUniversalAccessFromFileURLs(value); 234 235 value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls, 236 global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls)); 237 settings->setAllowFileAccessFromFileURLs(value); 238 239 value = attributes.value(QWebSettings::XSSAuditingEnabled, 240 global->attributes.value(QWebSettings::XSSAuditingEnabled)); 241 settings->setXSSAuditorEnabled(value); 242 243 #if ENABLE(TILED_BACKING_STORE) 244 value = attributes.value(QWebSettings::TiledBackingStoreEnabled, 245 global->attributes.value(QWebSettings::TiledBackingStoreEnabled)); 246 settings->setTiledBackingStoreEnabled(value); 247 #endif 248 249 value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled, 250 global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled)); 251 settings->setNeedsSiteSpecificQuirks(value); 252 212 253 settings->setUsesPageCache(WebCore::pageCache()->capacity()); 213 254 } else { … … 251 292 each attribute. 252 293 253 QWebSettings also configures global properties such as the Web page memory254 cache and the Web pageicon database, local database storage and offline294 QWebSettings also configures global properties such as the web page memory 295 cache, icon database, local database storage and offline 255 296 applications storage. 256 297 … … 260 301 \l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications, 261 302 this attribute is enabled for all pages by setting it on the 262 \l{globalSettings()}{global settings object}. 303 \l{globalSettings()}{global settings object}. QtWebKit will always ignore this setting 304 when processing Qt plugins. The decision to allow a Qt plugin is made by the client 305 in its reimplementation of QWebPage::createPlugin(). 263 306 264 307 \section1 Web Application Support … … 299 342 \value MinimumFontSize The hard minimum font size. 300 343 \value MinimumLogicalFontSize The minimum logical font size that is applied 301 after zooming with QWebFrame's textSizeMultiplier().344 when zooming out with QWebFrame::setTextSizeMultiplier(). 302 345 \value DefaultFontSize The default font size for regular text. 303 346 \value DefaultFixedFontSize The default font size for fixed-pitch text. … … 321 364 322 365 \value AutoLoadImages Specifies whether images are automatically loaded in 323 web pages. 366 web pages. This is enabled by default. 324 367 \value DnsPrefetchEnabled Specifies whether QtWebkit will try to pre-fetch DNS entries to 325 speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later. 368 speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later. This is disabled by default. 326 369 \value JavascriptEnabled Enables or disables the running of JavaScript 327 programs. 370 programs. This is enabled by default 328 371 \value JavaEnabled Enables or disables Java applets. 329 372 Currently Java applets are not supported. 330 \value PluginsEnabled Enables or disables plugins in Web pages. 373 \value PluginsEnabled Enables or disables plugins in Web pages (e.g. using NPAPI). Qt plugins 374 with a mimetype such as "application/x-qt-plugin" are not affected by this setting. This is disabled by default. 331 375 \value PrivateBrowsingEnabled Private browsing prevents WebKit from 332 recording visited pages in the history and storing web page icons. 376 recording visited pages in the history and storing web page icons. This is disabled by default. 333 377 \value JavascriptCanOpenWindows Specifies whether JavaScript programs 334 can open new windows. 378 can open new windows. This is disabled by default. 335 379 \value JavascriptCanAccessClipboard Specifies whether JavaScript programs 336 can read or write to the clipboard. 380 can read or write to the clipboard. This is disabled by default. 337 381 \value DeveloperExtrasEnabled Enables extra tools for Web developers. 338 382 Currently this enables the "Inspect" element in the context menu as 339 well as the use of QWebInspector which controls the WebKit WebInspector 340 for web site debugging. 383 well as the use of QWebInspector which controls the web inspector 384 for web site debugging. This is disabled by default. 385 \value SpatialNavigationEnabled Enables or disables the Spatial Navigation 386 feature, which consists in the ability to navigate between focusable 387 elements in a Web page, such as hyperlinks and form controls, by using 388 Left, Right, Up and Down arrow keys. For example, if a user presses the 389 Right key, heuristics determine whether there is an element he might be 390 trying to reach towards the right and which element he probably wants. 391 This is disabled by default. 341 392 \value LinksIncludedInFocusChain Specifies whether hyperlinks should be 342 included in the keyboard focus chain. 343 \value ZoomTextOnly Specifies whether the zoom factor on a frame applies to344 only t he text or all content.393 included in the keyboard focus chain. This is enabled by default. 394 \value ZoomTextOnly Specifies whether the zoom factor on a frame applies 395 only to the text or to all content. This is disabled by default. 345 396 \value PrintElementBackgrounds Specifies whether the background color and images 346 are also drawn when the page is printed. 397 are also drawn when the page is printed. This is enabled by default. 347 398 \value OfflineStorageDatabaseEnabled Specifies whether support for the HTML 5 348 offline storage feature is enabled or not. Disabled by default.399 offline storage feature is enabled or not. This is disabled by default. 349 400 \value OfflineWebApplicationCacheEnabled Specifies whether support for the HTML 5 350 web application cache feature is enabled or not. Disabled by default.401 web application cache feature is enabled or not. This is disabled by default. 351 402 \value LocalStorageEnabled Specifies whether support for the HTML 5 352 local storage feature is enabled or not. Disabled by default.403 local storage feature is enabled or not. This is disabled by default. 353 404 \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use 354 405 QWebSettings::LocalStorageEnabled instead. 355 \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. 406 \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are 407 allowed to access remote urls. This is disabled by default. For more information 408 about security origins and local vs. remote content see QWebSecurityOrigin. 409 \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are 410 allowed to access other local urls. This is enabled by default. For more information 411 about security origins and local vs. remote content see QWebSecurityOrigin. 412 \value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site 413 scripting attempts. Suspicious scripts will be blocked and reported in the inspector's 414 JavaScript console. Enabling this feature might have an impact on performance 415 and it is disabled by default. 416 \value AcceleratedCompositingEnabled This feature, when used in conjunction with 417 QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and 418 opacity properties will be rendered by composing the cached content of the animated elements. 419 This is enabled by default. 420 \value TiledBackingStoreEnabled This setting enables the tiled backing store feature 421 for a QGraphicsWebView. With the tiled backing store enabled, the web page contents in and around 422 the current visible area is speculatively cached to bitmap tiles. The tiles are automatically kept 423 in sync with the web page as it changes. Enabling tiling can significantly speed up painting heavy 424 operations like scrolling. Enabling the feature increases memory consumption. It does not work well 425 with contents using CSS fixed positioning (see also \l{QGraphicsWebView::}{resizesToContents} property). 426 \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily 427 freeze the contents of the backing store. This is disabled by default. 428 \value FrameFlatteningEnabled With this setting each subframe is expanded to its contents. 429 On touch devices, it is desired to not have any scrollable sub parts of the page 430 as it results in a confusing user experience, with scrolling sometimes scrolling sub parts 431 and at other times scrolling the page itself. For this reason iframes and framesets are 432 barely usable on touch devices. This will flatten all the frames to become one scrollable page. 433 This is disabled by default. 434 \value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is 435 enabled by default. 356 436 */ 357 437 … … 377 457 d->attributes.insert(QWebSettings::DnsPrefetchEnabled, false); 378 458 d->attributes.insert(QWebSettings::JavascriptEnabled, true); 459 d->attributes.insert(QWebSettings::SpatialNavigationEnabled, false); 379 460 d->attributes.insert(QWebSettings::LinksIncludedInFocusChain, true); 380 461 d->attributes.insert(QWebSettings::ZoomTextOnly, false); … … 384 465 d->attributes.insert(QWebSettings::LocalStorageEnabled, false); 385 466 d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); 467 d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true); 468 d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true); 469 d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false); 470 d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false); 471 d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true); 386 472 d->offlineStorageDefaultQuota = 5 * 1024 * 1024; 387 473 d->defaultTextEncoding = QLatin1String("iso-8859-1"); … … 452 538 with UTF-8 and Base64 encoded data, such as: 453 539 454 "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;" 540 "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==" 541 542 \note If the base64 data is not valid, the style will not be applied. 455 543 456 544 \sa userStyleSheetUrl() … … 503 591 to store "favicons" associated with web sites. 504 592 505 \a path must point to an existing directory where the icons are stored.593 \a path must point to an existing directory. 506 594 507 595 Setting an empty path disables the icon database. 596 597 \sa iconDatabasePath(), clearIconDatabase() 508 598 */ 509 599 void QWebSettings::setIconDatabasePath(const QString& path) … … 548 638 Returns the web site's icon for \a url. 549 639 550 If the web site does not specify an icon , orthe icon is not in the640 If the web site does not specify an icon \bold OR if the icon is not in the 551 641 database, a null QIcon is returned. 552 642 … … 585 675 given \a type. 586 676 587 For example, when an image cannot be loaded the pixmap specified by677 For example, when an image cannot be loaded, the pixmap specified by 588 678 \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead. 589 679 … … 602 692 Returns a previously set pixmap used to draw replacement graphics of the 603 693 specified \a type. 604 605 For example, when an image cannot be loaded the pixmap specified by606 \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.607 694 608 695 \sa setWebGraphic() … … 646 733 647 734 The Page Cache allows for a nicer user experience when navigating forth or back 648 to pages in the forward/back history, by pausing and resuming up to \a pages 649 per page group. 735 to pages in the forward/back history, by pausing and resuming up to \a pages. 650 736 651 737 For more information about the feature, please refer to: … … 719 805 720 806 /*! 721 Resets the actual font family to the default font family, specified by722 \a which.807 Resets the actual font family specified by \a which to the one set 808 in the global QWebSettings instance. 723 809 724 810 This function has no effect on the global QWebSettings instance. … … 762 848 \fn void QWebSettings::resetAttribute(WebAttribute attribute) 763 849 764 Resets the setting of \a attribute. 850 Resets the setting of \a attribute to the value specified in the 851 global QWebSettings instance. 852 765 853 This function has no effect on the global QWebSettings instance. 766 854 … … 778 866 \since 4.5 779 867 780 Sets the path for HTML5 offline storage to \a path.781 782 \a path must point to an existing directory where the databases are stored.868 Sets \a path as the save location for HTML5 client-side database storage data. 869 870 \a path must point to an existing directory. 783 871 784 872 Setting an empty path disables the feature. 873 874 Support for client-side databases can enabled by setting the 875 \l{QWebSettings::OfflineStorageDatabaseEnabled}{OfflineStorageDatabaseEnabled} attribute. 785 876 786 877 \sa offlineStoragePath() … … 796 887 \since 4.5 797 888 798 Returns the path of the HTML5 offline storage or an empty string if the889 Returns the path of the HTML5 client-side database storage or an empty string if the 799 890 feature is disabled. 800 891 … … 833 924 /*! 834 925 \since 4.6 835 \relates QWebSettings836 926 837 927 Sets the path for HTML5 offline web application cache storage to \a path. 838 928 839 929 An application cache acts like an HTTP cache in some sense. For documents 840 that use the application cache via JavaScript, the loader mechinerywill930 that use the application cache via JavaScript, the loader engine will 841 931 first ask the application cache for the contents, before hitting the 842 932 network. … … 845 935 http://dev.w3.org/html5/spec/Overview.html#appcache 846 936 847 \a path must point to an existing directory where the cache is stored.937 \a path must point to an existing directory. 848 938 849 939 Setting an empty path disables the feature. 940 941 Support for offline web application cache storage can enabled by setting the 942 \l{QWebSettings::OfflineWebApplicationCacheEnabled}{OfflineWebApplicationCacheEnabled} attribute. 850 943 851 944 \sa offlineWebApplicationCachePath() … … 860 953 /*! 861 954 \since 4.6 862 \relates QWebSettings863 955 864 956 Returns the path of the HTML5 offline web application cache storage … … 885 977 { 886 978 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 979 WebCore::cacheStorage().empty(); 980 WebCore::cacheStorage().vacuumDatabaseFile(); 887 981 WebCore::cacheStorage().setMaximumSize(maximumSize); 888 982 #endif … … 905 999 /*! 906 1000 \since 4.6 907 \relates QWebSettings908 1001 909 1002 Sets the path for HTML5 local storage to \a path. … … 925 1018 /*! 926 1019 \since 4.6 927 \relates QWebSettings928 1020 929 1021 Returns the path for HTML5 local storage. … … 938 1030 /*! 939 1031 \since 4.6 940 \relates QWebSettings 941 942 Enables WebKit persistent data and sets the path to \a path. 943 If the \a path is empty the path for persistent data is set to the 944 user-specific data location specified by 945 \l{QDesktopServices::DataLocation}{DataLocation}. 946 1032 1033 Enables WebKit data persistence and sets the path to \a path. 1034 If \a path is empty, the user-specific data location specified by 1035 \l{QDesktopServices::DataLocation}{DataLocation} will be used instead. 1036 1037 This method will simultaneously set and enable the iconDatabasePath(), 1038 localStoragePath(), offlineStoragePath() and offlineWebApplicationCachePath(). 1039 947 1040 \sa localStoragePath() 948 1041 */ … … 952 1045 953 1046 if (path.isEmpty()) { 1047 #ifndef QT_NO_DESKTOPSERVICES 954 1048 storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); 955 1049 #endif 956 1050 if (storagePath.isEmpty()) 957 1051 storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName()); -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
r561 r846 64 64 OfflineWebApplicationCacheEnabled, 65 65 LocalStorageEnabled, 66 #if def QT_DEPRECATED66 #if defined(QT_DEPRECATED) || defined(qdoc) 67 67 LocalStorageDatabaseEnabled = LocalStorageEnabled, 68 68 #endif 69 69 LocalContentCanAccessRemoteUrls, 70 DnsPrefetchEnabled 70 DnsPrefetchEnabled, 71 XSSAuditingEnabled, 72 AcceleratedCompositingEnabled, 73 SpatialNavigationEnabled, 74 LocalContentCanAccessFileUrls, 75 TiledBackingStoreEnabled, 76 FrameFlatteningEnabled, 77 SiteSpecificQuirksEnabled 71 78 }; 72 79 enum WebGraphic { … … 74 81 MissingPluginGraphic, 75 82 DefaultFrameIconGraphic, 76 TextAreaSizeGripCornerGraphic 83 TextAreaSizeGripCornerGraphic, 84 DeleteButtonGraphic 77 85 }; 78 86 enum FontSize { -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
r651 r846 23 23 #include "qwebview.h" 24 24 25 #include "Page.h" 25 26 #include "QWebPageClient.h" 27 #include "Settings.h" 26 28 #include "qwebframe.h" 27 29 #include "qwebpage_p.h" 28 29 30 #include "qbitmap.h" 30 31 #include "qevent.h" … … 45 46 46 47 void _q_pageDestroyed(); 48 void unsetPageIfExists(); 47 49 48 50 QWebView *view; … … 60 62 #ifdef Q_WS_MAEMO_5 61 63 #include "qabstractkineticscroller.h" 62 63 class QWebViewKineticScroller : public QAbstractKineticScroller { 64 #include "qapplication.h" 65 66 // QCoreApplication::sendSpontaneousEvent() is private, hence this friend wrapper 67 bool qt_sendSpontaneousEvent(QObject* receiver, QEvent* ev) 68 { 69 return QCoreApplication::sendSpontaneousEvent(receiver, ev); 70 } 71 72 class QWebViewKineticScroller : public QObject, public QAbstractKineticScroller { 64 73 public: 65 QWebViewKineticScroller() : QAbstractKineticScroller() {} 66 // remember the frame where the button was pressed 74 QWebViewKineticScroller() 75 : QObject() 76 , QAbstractKineticScroller() 77 , m_view(0) 78 , m_ignoreEvents(false) 79 { 80 } 81 82 void setWidget(QWebView* widget) 83 { 84 if (m_view) { 85 m_view->removeEventFilter(this); 86 QWebFrame* frame = m_view->page()->mainFrame(); 87 frame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy); 88 frame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy); 89 } 90 91 m_view = widget; 92 setParent(m_view); 93 if (m_view) { 94 QWebFrame* frame = m_view->page()->mainFrame(); 95 m_oldHorizontalScrollBarPolicy = frame->scrollBarPolicy(Qt::Horizontal); 96 m_oldVerticalScrollBarPolicy = frame->scrollBarPolicy(Qt::Vertical); 97 frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); 98 frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); 99 m_view->installEventFilter(this); 100 } 101 } 102 103 protected: 67 104 bool eventFilter(QObject* o, QEvent* ev) 68 105 { 106 if (!o || m_view != o || m_ignoreEvents || !m_view->isEnabled()) 107 return QObject::eventFilter(o, ev); 108 109 bool res = false; 110 69 111 switch (ev->type()) { 70 112 case QEvent::MouseButtonPress: { 113 // remember the frame where the button was pressed 71 114 QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos()); 72 115 if (hitFrame) 73 116 m_frame = hitFrame; 117 // fall through 118 } 119 case QEvent::MouseMove: 120 case QEvent::MouseButtonRelease: 121 case QEvent::MouseButtonDblClick: 122 res = handleMouseEvent(static_cast<QMouseEvent*>(ev)); 74 123 break; 75 }76 124 default: 77 125 break; 78 126 } 79 return QAbstractKineticScroller::eventFilter(o, ev); 80 } 81 82 protected: 127 return res ? true : QObject::eventFilter(o, ev); 128 } 129 130 void cancelLeftMouseButtonPress(const QPoint& /* globalPressPos */) 131 { 132 QMouseEvent cmem(QEvent::MouseMove, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() | Qt::LeftButton, QApplication::keyboardModifiers()); 133 sendEvent(m_view, &cmem); 134 QMouseEvent cmer(QEvent::MouseButtonRelease, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() & ~Qt::LeftButton, QApplication::keyboardModifiers()); 135 sendEvent(m_view, &cmer); 136 } 137 83 138 QWebFrame* currentFrame() const 84 139 { 85 if (!m_frame.isNull()) 86 return m_frame.data(); 87 88 QWebView* view = static_cast<QWebView*>(widget()); 89 QWebFrame* frame = view->page()->mainFrame(); 90 return frame; 140 if (m_frame) 141 return m_frame; 142 143 if (m_view) 144 return m_view->page()->mainFrame(); 145 146 return 0; 91 147 } 92 148 … … 94 150 QWebFrame* scrollingFrameAt(const QPoint& pos) const 95 151 { 96 QWebView* view = static_cast<QWebView*>(widget()); 97 QWebFrame* mainFrame = view->page()->mainFrame(); 98 QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame(); 99 QSize range = hitFrame->contentsSize() - hitFrame->geometry().size(); 100 101 while (hitFrame && range.width() <= 1 && range.height() <= 1) 102 hitFrame = hitFrame->parentFrame(); 103 104 return hitFrame; 105 } 106 107 void attachToWidget() 108 { 109 QWebView* view = static_cast<QWebView*>(widget()); 110 QWebFrame* mainFrame = view->page()->mainFrame(); 111 m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal); 112 m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical); 113 mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); 114 mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); 115 view->installEventFilter(this); 116 } 117 118 void removeFromWidget() 119 { 120 QWebView* view = static_cast<QWebView*>(widget()); 121 view->removeEventFilter(this); 122 QWebFrame* mainFrame = view->page()->mainFrame(); 123 mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy); 124 mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy); 125 } 126 127 QRect positionRange() const 128 { 129 QRect r; 130 QWebFrame* frame = currentFrame(); 131 r.setSize(frame->contentsSize() - frame->geometry().size()); 132 return r; 133 } 134 135 QPoint position() const 152 QWebFrame* hitFrame = 0; 153 if (m_view) { 154 QWebFrame* frame = m_view->page()->mainFrame(); 155 hitFrame = frame->hitTestContent(pos).frame(); 156 QSize range = hitFrame->contentsSize() - hitFrame->geometry().size(); 157 158 while (hitFrame && range.width() <= 1 && range.height() <= 1) 159 hitFrame = hitFrame->parentFrame(); 160 161 return hitFrame; 162 } 163 } 164 165 QPoint maximumScrollPosition() const 136 166 { 137 167 QWebFrame* frame = currentFrame(); 138 return frame->scrollPosition(); 168 QSize s = frame ? frame->contentsSize() - frame->geometry().size() : QSize(0, 0); 169 return QPoint(qMax(0, s.width()), qMax(0, s.height())); 170 } 171 172 QPoint scrollPosition() const 173 { 174 QWebFrame* frame = currentFrame(); 175 return frame ? frame->scrollPosition() : QPoint(); 139 176 } 140 177 141 178 QSize viewportSize() const 142 179 { 143 return static_cast<QWebView*>(widget())->page()->viewportSize();144 } 145 146 void set Position(const QPoint& point, const QPoint& /* overShootDelta */)180 return m_view ? m_view->page()->viewportSize() : QSize(); 181 } 182 183 void setScrollPosition(const QPoint& point, const QPoint& /* overShootDelta */) 147 184 { 148 185 QWebFrame* frame = currentFrame(); 149 frame->setScrollPosition(point); 150 } 151 186 if (frame) 187 frame->setScrollPosition(point); 188 } 189 190 void sendEvent(QWidget* w, QEvent* ev) 191 { 192 m_ignoreEvents = true; 193 qt_sendSpontaneousEvent(w, ev); 194 m_ignoreEvents = false; 195 } 196 197 QWebView* m_view; 198 bool m_ignoreEvents; 152 199 QPointer<QWebFrame> m_frame; 153 200 Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy; … … 254 301 #endif 255 302 303 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 304 setAttribute(Qt::WA_AcceptTouchEvents); 305 #endif 256 306 #if defined(Q_WS_MAEMO_5) 257 307 QAbstractKineticScroller* scroller = new QWebViewKineticScroller(); 258 scroller->setWidget(this); 308 static_cast<QWebViewKineticScroller*>(scroller)->setWidget(this); 309 setProperty("kineticScroller", QVariant::fromValue(scroller)); 259 310 #endif 260 311 setAcceptDrops(true); … … 298 349 } 299 350 351 void QWebViewPrivate::unsetPageIfExists() 352 { 353 if (!page) 354 return; 355 356 // if the page client is the special client constructed for 357 // delegating the responsibilities to a QWidget, we need 358 // to destroy it. 359 360 if (page->d->client && page->d->client->isQWidgetClient()) 361 delete page->d->client; 362 363 page->d->client = 0; 364 365 // if the page was created by us, we own it and need to 366 // destroy it as well. 367 368 if (page->parent() == view) 369 delete page; 370 else 371 page->disconnect(view); 372 } 373 300 374 /*! 301 375 Makes \a page the new web page of the web view. … … 311 385 if (d->page == page) 312 386 return; 313 if (d->page) { 314 d->page->d->client = 0; // unset the page client 315 if (d->page->parent() == this) 316 delete d->page; 317 else 318 d->page->disconnect(this); 319 } 387 388 d->unsetPageIfExists(); 320 389 d->page = page; 390 321 391 if (d->page) { 322 392 d->page->setView(this); … … 375 445 */ 376 446 377 #if QT_VERSION < 0x040400 && !defined(qdoc)378 void QWebView::load(const QWebNetworkRequest &request)379 #else380 447 void QWebView::load(const QNetworkRequest &request, 381 448 QNetworkAccessManager::Operation operation, 382 449 const QByteArray &body) 383 #endif 384 { 385 page()->mainFrame()->load(request 386 #if QT_VERSION >= 0x040400 387 , operation, body 388 #endif 389 ); 450 { 451 page()->mainFrame()->load(request, operation, body); 390 452 } 391 453 … … 521 583 } 522 584 585 #ifndef QT_NO_ACTION 523 586 /*! 524 587 Returns a pointer to a QAction that encapsulates the specified web action \a action. … … 528 591 return page()->action(action); 529 592 } 593 #endif 530 594 531 595 /*! … … 741 805 d->page->event(e); 742 806 #ifndef QT_NO_CURSOR 743 #if QT_VERSION >= 0x040400744 807 } else if (e->type() == QEvent::CursorChange) { 745 808 // An unsetCursor will set the cursor to Qt::ArrowCursor. … … 754 817 d->page->d->client->resetCursor(); 755 818 #endif 819 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 820 } else if (e->type() == QEvent::TouchBegin 821 || e->type() == QEvent::TouchEnd 822 || e->type() == QEvent::TouchUpdate) { 823 d->page->event(e); 824 if (e->isAccepted()) 825 return true; 756 826 #endif 757 827 } else if (e->type() == QEvent::Leave) -
trunk/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
r561 r846 28 28 #include <QtGui/qpainter.h> 29 29 #include <QtCore/qurl.h> 30 #if QT_VERSION >= 0x04040031 30 #include <QtNetwork/qnetworkaccessmanager.h> 32 #endif33 31 34 32 QT_BEGIN_NAMESPACE … … 62 60 63 61 void load(const QUrl& url); 64 #if QT_VERSION < 0x040400 && !defined(qdoc)65 void load(const QWebNetworkRequest& request);66 #else67 62 void load(const QNetworkRequest& request, 68 63 QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, 69 64 const QByteArray &body = QByteArray()); 70 #endif71 65 void setHtml(const QString& html, const QUrl& baseUrl = QUrl()); 72 66 void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl()); … … 82 76 QString selectedText() const; 83 77 78 #ifndef QT_NO_ACTION 84 79 QAction* pageAction(QWebPage::WebAction action) const; 80 #endif 85 81 void triggerPageAction(QWebPage::WebAction action, bool checked = false); 86 82 -
trunk/src/3rdparty/webkit/WebKit/qt/ChangeLog
r769 r846 1 2010-09-12 Martin Smith <martin.smith@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 doc: Changed the title so lists of contents sort better. 6 7 * docs/qtwebkit.qdoc: 8 9 2010-09-12 David Boddie <david.boddie@nokia.com> 10 11 Reviewed by Simon Hausmann. 12 13 Doc: More work on the QML documentation. 14 15 * declarative/qdeclarativewebview.cpp: 16 17 2010-09-12 Martin Jones <martin.jones@nokia.com> 18 19 Reviewed by Simon Hausmann. 20 21 [Qml] Ensure WebView gets focus when an editable node is clicked on. 22 23 Task-number: QTBUG-13342 24 25 * declarative/qdeclarativewebview.cpp: 26 (GraphicsWebView::mousePressEvent): 27 28 2010-09-12 David Boddie <david.boddie@nokia.com> 29 30 Reviewed by Simon Hausmann. 31 32 Doc: qdoc fixes. 33 34 * declarative/qdeclarativewebview.cpp: 35 36 2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> 37 38 Reviewed by Simon Hausmann. 39 40 [Qt] let WebKit inject itself into the qt configuration 41 42 Task-number: QTBUG-12379 43 44 * qt_webkit_version.pri: Use the faster + instead of * 45 operator to add webkit to the config. 46 47 2010-09-12 Martin Smith <martin.smith@nokia.com> 48 49 Reviewed by Simon Hausmann. 50 51 [Qt] Fix group of declarative web view in QML docs. 52 53 * declarative/qdeclarativewebview.cpp: 54 55 2010-08-20 Girish Ramakrishnan <girish@forwardbias.in> 56 57 Reviewed by Ariya Hidayat. 58 59 [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775. 60 61 https://bugs.webkit.org/show_bug.cgi?id=44043 62 63 * WebCoreSupport/FrameLoaderClientQt.cpp: 64 (WebCore::FrameLoaderClientQt::createPlugin): 65 66 2010-08-19 Girish Ramakrishnan <girish@forwardbias.in> 67 68 Reviewed by Kenneth Christiansen. 69 70 [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5 71 as Flash XEmbed support is flaky. 72 73 https://bugs.webkit.org/show_bug.cgi?id=44043 74 75 * WebCoreSupport/FrameLoaderClientQt.cpp: 76 (WebCore::FrameLoaderClientQt::createPlugin): 77 78 2010-08-05 David Leong <david.leong@nokia.com> 79 80 Reviewed by Simon Hausmann. 81 82 [Qt] Input mode states are not reset after entering a password field 83 https://bugs.webkit.org/show_bug.cgi?id=43530 84 85 Input mode hints are not reset if clicking on password <input> elements then 86 clicking on <textarea> elements 87 88 * WebCoreSupport/EditorClientQt.cpp: 89 (WebCore::EditorClientQt::setInputMethodState): 90 * tests/qwebview/resources/input_types.html: 91 * tests/qwebview/tst_qwebview.cpp: 92 (tst_QWebView::focusInputTypes): 93 94 95 2010-07-27 Simon Hausmann <simon.hausmann@nokia.com> 96 97 Reviewed by Tor Arne VestbÞ. 98 99 [Qt] Incorrect input method hints 100 https://bugs.webkit.org/show_bug.cgi?id=43037 101 102 Properly set or reset all input method hints when 103 activating input fields. 104 105 * WebCoreSupport/EditorClientQt.cpp: 106 (WebCore::EditorClientQt::setInputMethodState): 107 * tests/qwebview/tst_qwebview.cpp: 108 (tst_QWebView::focusInputTypes): Extended unit test to verify that we 109 reset hints. 110 111 2009-10-30 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 112 113 Reviewed by Kenneth Rohde Christiansen. 114 115 [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() 116 117 This ensures that long-running JavaScript (for example due to a modal alert() dialog), 118 will not trigger a deferred load after only 500ms (the default tokenizer delay) while 119 still giving a reasonable timeout (10 seconds) to prevent deadlock. 120 121 https://bugs.webkit.org/show_bug.cgi?id=29381 122 123 * Api/qwebframe.cpp: Document the behaviour 124 * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads 125 * tests/qwebframe/tst_qwebframe.cpp: Add test 126 127 2010-07-07 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 128 129 Reviewed by Darin Adler. 130 131 Prevent assertion/duplicate loads for non-deferred subtitute-data loads 132 133 https://bugs.webkit.org/show_bug.cgi?id=30879 134 135 MainResourceLoader uses the member m_initialRequest to store requests for future 136 deferred loads. When doing the actual load in handleDataLoadNow(), we therefore 137 have to clear this request so that subsequent entries into the loader will not 138 start yet another load. 139 140 This can happen as a result of a PageGroupLoadDeferrer going out of scope when 141 returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false), 142 but only in the case of using both substitute-data and non-deferred main resource 143 load together. That's why two new DRT functions were added: 144 145 * queueLoadHTMLString() 146 * setDeferMainResourceLoad() 147 148 The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac 149 and Win the hook uses new SPI in WebDataSource. For Qt a new static member was 150 added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt. 151 152 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 153 (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad): 154 * WebCoreSupport/DumpRenderTreeSupportQt.h: 155 * WebCoreSupport/FrameLoaderClientQt.cpp: 156 (WebCore::FrameLoaderClientQt::createDocumentLoader): 157 * WebCoreSupport/FrameLoaderClientQt.h: 158 159 2010-07-23 David Boddie <dboddie@trolltech.com> 160 161 Reviewed by Simon Hausmann. 162 163 Doc: Fixed incorrect QML property type. 164 165 * declarative/qdeclarativewebview.cpp: 166 167 2010-07-23 Simon Hausmann <simon.hausmann@nokia.com> 168 169 [Qt] Build fix for Qt apps 170 171 Add webkit to QT_CONFIG. qconfig.pri will read qt_webkit_version.pri and 172 that's how it will pick up webkit in QT_CONFIG. 173 174 * qt_webkit_version.pri: 175 176 2010-07-09 Kent Hansen <kent.hansen@nokia.com> 177 178 Reviewed by Kenneth Rohde Christiansen. 179 180 [Qt] Skip test that never terminates on maemo5 181 182 Due to https://bugs.webkit.org/show_bug.cgi?id=38538 183 the tst_QWebPage::infiniteLoopJS() autotest never terminates. 184 Skip the test so that the test case may run to completion. 185 186 Patch by Dominik Holland <dominik.holland@nokia.com> 187 188 * tests/qwebpage/tst_qwebpage.cpp: 189 (tst_QWebPage::infiniteLoopJS): 190 191 2010-07-09 Simon Hausmann <simon.hausmann@nokia.com> 192 193 Unreviewed trivial Symbian build fix. 194 195 [Qt] Fix the Symbian build when compiling without S60 196 197 Use Q_OS_SYMBIAN instead of Q_WS_S60 for the user agent 198 determination. 199 200 * Api/qwebpage.cpp: 201 (QWebPage::userAgentForUrl): 202 203 2010-07-09 Kristian Amlie <kristian.amlie@nokia.com> 204 205 Reviewed by Simon Hausmann. 206 207 [Qt] Fixed Qt symbian/linux-armcc mkspec when configured with -qtlibinfix. 208 209 * declarative/declarative.pro: Use QT_LIBINFIX. 210 211 2010-06-01 Raine Makelainen <raine.makelainen@nokia.com> 212 213 Reviewed by Simon Hausmann. 214 215 [Qt]: REGRESSION(r58703): QWebSettings::JavascriptCanAccessClipboard has wrong case in "Javascript" part. 216 https://bugs.webkit.org/show_bug.cgi?id=39878 217 218 QWebSettings::JavaScriptCanAccessClipboard reverted back to 219 QWebSettings::JavascriptCanAccessClipboard. QWebSettings::DOMPasteAllowed enum removed. 220 221 Value of QWebSettings::JavascriptCanAccessClipboard to setDOMPasteAllowed and 222 setJavaScriptCanAccessClipboard of WebCore::Settings. 223 224 * Api/qwebsettings.cpp: 225 (QWebSettingsPrivate::apply): 226 * Api/qwebsettings.h: 227 228 2010-05-03 Abhishek Arya <inferno@chromium.org> 229 230 Reviewed by Adam Barth. 231 232 Add support for controlling clipboard access from javascript. 233 Clipboard access from javascript is disabled by default. 234 https://bugs.webkit.org/show_bug.cgi?id=27751 235 236 * Api/qwebsettings.cpp: 237 (QWebSettingsPrivate::apply): 238 * Api/qwebsettings.h: 239 240 2010-03-24 Kent Hansen <kent.hansen@nokia.com> 241 242 Reviewed by Simon Hausmann. 243 244 [Qt] Rename QWebSettings::XSSAuditorEnabled to XSSAuditingEnabled 245 https://bugs.webkit.org/show_bug.cgi?id=36522 246 247 For consistency with other QWebSettings attributes. 248 249 * Api/qwebsettings.cpp: 250 (QWebSettingsPrivate::apply): 251 * Api/qwebsettings.h: 252 253 2010-05-19 Antti Koivisto <koivisto@iki.fi> 254 255 Rubber-stamped by Kenneth Rohde Christiansen. 256 257 [Qt] TiledBackingStore updates broken when not using resizesToContents mode 258 https://bugs.webkit.org/show_bug.cgi?id=39359 259 260 Put the back logic that was lost in refactoring. 261 262 * WebCoreSupport/ChromeClientQt.cpp: 263 (WebCore::ChromeClientQt::visibleRectForTiledBackingStore): 264 * WebCoreSupport/PageClientQt.cpp: 265 (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect): 266 * WebCoreSupport/PageClientQt.h: 267 (WebCore::PageClientQWidget::viewResizesToContentsEnabled): 268 (WebCore::PageClientQGraphicsWidget::viewResizesToContentsEnabled): 269 270 2010-07-01 Bea Lam <bea.lam@nokia.com> 271 272 Reviewed by Simon Hausmann. 273 274 [Qt] Doc improvements for QDeclarativeWebView 275 276 * declarative/qdeclarativewebview.cpp: 277 278 2010-07-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 279 280 Reviewed by Kenneth Rohde Christiansen. 281 282 [Qt] Create QComboBoxes when clicked and destroy on hide. 283 https://bugs.webkit.org/show_bug.cgi?id=41451 284 285 Currently a QComboBox is created for each RenderMenuList and 286 it gets destroyed either when the RenderMenuList or the 287 QWebView (its Qt parent) is destroyed. This cause a crash 288 when the QWebView is destroyed before the render tree (which 289 is kept in cache). 290 291 This patch aim to destroy the QComboBox as soon as its popup 292 gets hidden, and likewise, create it only when the popup is 293 requested to be shown. 294 It also removes the unneeded reference to the QGraphicsProxyWidget, 295 destroying the QComboBox automatically destroys its bound 296 proxywidget. 297 298 * WebCoreSupport/QtFallbackWebPopup.cpp: 299 (WebCore::QtFallbackWebPopupCombo::hidePopup): 300 (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): 301 (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): 302 (WebCore::QtFallbackWebPopup::show): 303 (WebCore::QtFallbackWebPopup::hide): 304 (WebCore::QtFallbackWebPopup::destroyPopup): 305 (WebCore::QtFallbackWebPopup::populate): 306 * WebCoreSupport/QtFallbackWebPopup.h: 307 308 2010-06-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 309 310 Reviewed by Kenneth Rohde Christiansen. 311 312 [Qt] Make sure we catch closed QComboBox popups. 313 https://bugs.webkit.org/show_bug.cgi?id=39019 314 315 The way it works currently is using the QComboBox::show/hidePopup 316 virtual method to catch popup requests in the middle. There is 317 some cases however that the popup widget gets closed without 318 going through the hidePopup method. 319 320 This patch adds an event filter to the popup's view to know when 321 it gets closed and calls hidePopup to call our handling code. 322 This may get hidePopup called twice but this shouldn't have any 323 effect. 324 325 * WebCoreSupport/QtFallbackWebPopup.cpp: 326 (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo): 327 (WebCore::QtFallbackWebPopupCombo::eventFilter): 328 * WebCoreSupport/QtFallbackWebPopup.h: 329 330 2010-06-25 Luiz Agostini <luiz.agostini@openbossa.org> 331 332 Reviewed by Kenneth Rohde Christiansen. 333 334 [Qt] QtWebKit crashes if <select>'s render changes in its onchange event 335 https://bugs.webkit.org/show_bug.cgi?id=41164 336 337 QtWebKit crashes if <select>'s renderer changes in its onchange event. 338 339 * WebCoreSupport/QtFallbackWebPopup.cpp: 340 (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): 341 342 2010-06-28 Andreas Kling <andreas.kling@nokia.com> 343 344 Reviewed by Simon Hausmann. 345 346 [Qt] QGraphicsWebView crash when calling setScale() before setUrl() 347 https://bugs.webkit.org/show_bug.cgi?id=40000 348 349 Check 'page' before dereference in _q_scaleChanged() 350 Autotest included. 351 352 * Api/qgraphicswebview.cpp: 353 (QGraphicsWebViewPrivate::_q_scaleChanged): 354 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 355 (tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl): 356 357 2010-06-24 Simon Hausmann <simon.hausmann@nokia.com> 358 359 Unreviewed Symbian build fix. 360 361 The QML WebKit integration needs to be part of QtWebKit.sis 362 363 * declarative/declarative.pro: Removed non-working deployment. 364 365 2010-06-23 David Boddie <dboddie@trolltech.com> 366 367 Reviewed by Simon Hausmann. 368 369 [Qt] Doc: Fixed documentation errors. 370 371 * docs/qtwebkit-bridge.qdoc: 372 373 2010-06-23 Alessandro Portale <alessandro.portale@nokia.com> 374 375 Reviewed by Simon Hausmann. 376 377 [Qt] Provide the Webkit Qml plugin with a UID3 on Symbian 378 379 ...otherwise we cannot Symbian sign it. 380 381 * declarative/declarative.pro: 382 383 2010-06-23 Simon Hausmann <simon.hausmann@nokia.com> 384 385 Unreviewed Qt package build fix. 386 387 When building without build-webkit, set OUTPUT_DIR if necessary, like 388 in the other .pro files. 389 390 * declarative/declarative.pro: 391 392 2010-06-22 Tasuku Suzuki <tasuku.suzuki@nokia.com> 393 394 Reviewed by Simon Hausmann. 395 396 [Qt] Fix compilation with QT_NO_COMBOBOX. 397 398 * WebCoreSupport/ChromeClientQt.cpp: 399 (WebCore::ChromeClientQt::createSelectPopup): 400 401 2010-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 402 403 Reviewed by nobody, build fix. 404 405 [Qt] Second fix attempt for the build break introduced by r61002. 406 407 * Api/qwebpage.cpp: 408 (QWebPagePrivate::QWebPagePrivate): 409 410 2010-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 411 412 Reviewed by nobody, build fix. 413 414 [Qt] Fix build break introduced by r61002. 415 416 * Api/qwebpage.cpp: 417 (QWebPagePrivate::QWebPagePrivate): 418 419 2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 420 421 Reviewed by Simon Hausmann. 422 423 [Qt] Implement the simple text code path. 424 https://bugs.webkit.org/show_bug.cgi?id=40077 425 426 Remove the FONT_FAST_PATH macro and use the Qt's 427 fast text implementation instead of the one of WebKit. 428 429 The Qt::TextBypassShaping flag is used to tell Qt to 430 only use the glyph advances. 431 432 Qt 4.7 is needed to get this flag thus the complex path is always 433 used if QtWebKit is compiled against an earlier version. 434 435 Contrary to the WebKit's implementation, the complex code path 436 is taken if the text is RightToLeft, justified or is formatted 437 with non-zero letter or word spacing. 438 439 * Api/qwebpage.cpp: 440 (QWebPagePrivate::QWebPagePrivate): 441 442 2010-06-21 Simon Hausmann <simon.hausmann@nokia.com> 443 444 Unreviewed build fix. 445 446 [Qt] Fix package builds 447 448 Don't use rpath unless we're building inside the trunk. 449 450 * declarative/declarative.pro: 451 452 2010-06-19 Mirko Damiani <mirko@develer.com> 453 454 Reviewed by Simon Hausmann. 455 456 [Qt] Avoid truncation of zoom factor in QWebFrame's print function. 457 https://bugs.webkit.org/show_bug.cgi?id=40662 458 459 The zoom factor is a qreal number but its value is truncated to an 460 integer. So a cast to qreal is needed to avoid this issue. 461 462 * Api/qwebframe.cpp: 463 (QWebFrame::print): 464 465 2010-06-19 No'am Rosenthal <noam.rosenthal@nokia.com> 466 467 Reviewed by Simon Hausmann. 468 469 Bridge documentation: some snippets have the wrong indentation 470 https://bugs.webkit.org/show_bug.cgi?id=40717 471 472 Fixed code snippets 473 474 * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: 475 (wrapInFunction): 476 477 2010-06-19 Olivier Goffart <olivier.goffart@nokia.com> 478 479 Reviewed by Kenneth Rohde Christiansen. 480 481 [Qt] Compilation in QWebPagePrivate::timerEvent with clang 482 https://bugs.webkit.org/show_bug.cgi?id=40714 483 484 QObject::timerEvent is protected and cannot be accessed by QWebPagePrivate 485 with clang 486 487 QWebPagePrivate is a friend of QWebPage and then should have access to 488 all protected members of parents of QWebPage, including QObject. 489 But the clang team do not want to conform to this aspect of the specification 490 because "It is either a drafting error or a horrible mistake." 491 See http://llvm.org/bugs/show_bug.cgi?id=6840 492 493 This change is better because QWebPage does not reimplement the timerEvent 494 (QWebPagePrivate::timerEvent is called from QWebPage::event) 495 So customers that would reimplement their own timerEvent 496 for their own timer now get a chance to catch them. 497 498 499 * Api/qwebpage.cpp: 500 (QWebPagePrivate::timerEvent): 501 502 2010-06-18 Alexis Menard <alexis.menard@nokia.com> 503 504 Reviewed by Simon Hausmann. 505 506 [Qt] Fix documentation for the declarative module import. 507 508 * declarative/qdeclarativewebview.cpp: 509 510 2010-06-18 Simon Hausmann <simon.hausmann@nokia.com> 511 512 Reviewed by Antti Koivisto. 513 514 REGRESSION(r60958) [Qt] qwebpage::inputMethods auto-test fails 515 https://bugs.webkit.org/show_bug.cgi?id=40830 516 517 When activating a regular input method field, always set or unset the ImhHiddenText 518 input method hint. 519 520 * WebCoreSupport/EditorClientQt.cpp: 521 (WebCore::EditorClientQt::setInputMethodState): 522 523 2010-06-10 Raine Makelainen <raine.makelainen@nokia.com> 524 525 Reviewed by Kenneth Rohde Christiansen. 526 527 Impossible to set input method hints based HTML5 input types 528 https://bugs.webkit.org/show_bug.cgi?id=40107 529 530 EditorClientQt to set input method hints for "number", "tel", 531 "email", and "url" HTML input elements. 532 533 Tests for HTML input elements and input method hints added for 534 QGraphicsWebView and QWebView. 535 536 * WebCoreSupport/EditorClientQt.cpp: 537 (WebCore::EditorClientQt::setInputMethodState): 538 * tests/qgraphicswebview/resources/input_types.html: Added. 539 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 540 (GraphicsWebView::GraphicsWebView): 541 (GraphicsWebView::fireMouseClick): 542 (tst_QGraphicsWebView::focusInputTypes): 543 * tests/qgraphicswebview/tst_qgraphicswebview.qrc: Added. 544 * tests/qwebview/resources/input_types.html: Added. 545 * tests/qwebview/tst_qwebview.cpp: 546 (WebView::fireMouseClick): 547 (tst_QWebView::focusInputTypes): 548 * tests/qwebview/tst_qwebview.qrc: 549 550 2010-06-18 Alexis Menard <alexis.menard@nokia.com> 551 552 Reviewed by Simon Hausmann. 553 554 Fix documentation issue on the onAlert handler. 555 Fix compilation issue with QT_NO_ACTION. 556 557 * declarative/qdeclarativewebview.cpp: 558 * declarative/qdeclarativewebview_p.h: 559 560 2010-06-18 Alexis Menard <alexis.menard@nokia.com> 561 562 Reviewed by Simon Hausmann. 563 564 [Qt] Change the target path to QtWebKit. 565 566 * declarative/declarative.pro: 567 568 2010-06-17 Robert Hogan <robert@webkit.org> 569 570 [Qt] Build fix 571 572 Unreviewed. 573 574 Remove includes in qdeclarativewebview*.* that rely on an installation 575 of QtWebKit. 576 577 * declarative/qdeclarativewebview.cpp: 578 * declarative/qdeclarativewebview_p.h: 579 580 2010-06-17 Alexis Menard <alexis.menard@nokia.com> 581 582 Reviewed by Kenneth Rohde Christiansen. 583 584 [Qt] Upstream the WebKit QML integration plugin 585 https://bugs.webkit.org/show_bug.cgi?id=40050 586 587 Add to the Qt port the QML WebKit integration plugin. 588 QDeclarativeWebView is creating the item and expose 589 properties. The C++ API is not public, only the 590 properties are. 591 592 * declarative/declarative.pro: Added. 593 * declarative/plugin.cpp: Added. 594 (WebKitQmlPlugin::registerTypes): 595 * declarative/qdeclarativewebview.cpp: Added. 596 (QDeclarativeWebViewPrivate::QDeclarativeWebViewPrivate): 597 (QDeclarativeWebViewPrivate::): 598 (QDeclarativeWebViewPrivate::windowObjectsAppend): 599 (GraphicsWebView::GraphicsWebView): 600 (GraphicsWebView::mousePressEvent): 601 (GraphicsWebView::mouseReleaseEvent): 602 (GraphicsWebView::mouseDoubleClickEvent): 603 (GraphicsWebView::timerEvent): 604 (GraphicsWebView::mouseMoveEvent): 605 (QDeclarativeWebView::QDeclarativeWebView): 606 (QDeclarativeWebView::~QDeclarativeWebView): 607 (QDeclarativeWebView::init): 608 (QDeclarativeWebView::componentComplete): 609 (QDeclarativeWebView::status): 610 (QDeclarativeWebView::progress): 611 (QDeclarativeWebView::doLoadStarted): 612 (QDeclarativeWebView::doLoadProgress): 613 (QDeclarativeWebView::pageUrlChanged): 614 (QDeclarativeWebView::doLoadFinished): 615 (QDeclarativeWebView::url): 616 (QDeclarativeWebView::setUrl): 617 (QDeclarativeWebView::preferredWidth): 618 (QDeclarativeWebView::setPreferredWidth): 619 (QDeclarativeWebView::preferredHeight): 620 (QDeclarativeWebView::setPreferredHeight): 621 (QDeclarativeWebView::evaluateJavaScript): 622 (QDeclarativeWebView::updateDeclarativeWebViewSize): 623 (QDeclarativeWebView::initialLayout): 624 (QDeclarativeWebView::updateContentsSize): 625 (QDeclarativeWebView::geometryChanged): 626 (QDeclarativeWebView::javaScriptWindowObjects): 627 (QDeclarativeWebView::qmlAttachedProperties): 628 (QDeclarativeWebViewPrivate::updateWindowObjects): 629 (QDeclarativeWebView::renderingEnabled): 630 (QDeclarativeWebView::setRenderingEnabled): 631 (QDeclarativeWebView::heuristicZoom): 632 (QDeclarativeWebView::pressGrabTime): 633 (QDeclarativeWebView::setPressGrabTime): 634 (QDeclarativeWebView::backAction): 635 (QDeclarativeWebView::forwardAction): 636 (QDeclarativeWebView::reloadAction): 637 (QDeclarativeWebView::stopAction): 638 (QDeclarativeWebView::title): 639 (QDeclarativeWebView::icon): 640 (QDeclarativeWebView::setStatusText): 641 (QDeclarativeWebView::windowObjectCleared): 642 (QDeclarativeWebView::statusText): 643 (QDeclarativeWebView::page): 644 (QDeclarativeWebView::settingsObject): 645 (QDeclarativeWebView::setPage): 646 (QDeclarativeWebView::load): 647 (QDeclarativeWebView::html): 648 (QDeclarativeWebView::setHtml): 649 (QDeclarativeWebView::setContent): 650 (QDeclarativeWebView::history): 651 (QDeclarativeWebView::settings): 652 (QDeclarativeWebView::createWindow): 653 (QDeclarativeWebView::newWindowComponent): 654 (QDeclarativeWebView::setNewWindowComponent): 655 (QDeclarativeWebView::newWindowParent): 656 (QDeclarativeWebView::setNewWindowParent): 657 (QDeclarativeWebView::contentsSize): 658 (QDeclarativeWebView::contentsScale): 659 (QDeclarativeWebView::setContentsScale): 660 (QDeclarativeWebView::elementAreaAt): 661 (QDeclarativeWebPage::QDeclarativeWebPage): 662 (QDeclarativeWebPage::~QDeclarativeWebPage): 663 (QDeclarativeWebPage::chooseFile): 664 (QDeclarativeWebPage::javaScriptAlert): 665 (QDeclarativeWebPage::javaScriptConfirm): 666 (QDeclarativeWebPage::javaScriptPrompt): 667 (QDeclarativeWebPage::viewItem): 668 (QDeclarativeWebPage::createWindow): 669 * declarative/qdeclarativewebview_p.h: Added. 670 (QDeclarativeWebView::): 671 (QDeclarativeWebView::isComponentCompletePublic): 672 (QDeclarativeWebViewAttached::QDeclarativeWebViewAttached): 673 (QDeclarativeWebViewAttached::windowObjectName): 674 (QDeclarativeWebViewAttached::setWindowObjectName): 675 (QDeclarativeWebSettings::QDeclarativeWebSettings): 676 (QDeclarativeWebSettings::standardFontFamily): 677 (QDeclarativeWebSettings::setStandardFontFamily): 678 (QDeclarativeWebSettings::fixedFontFamily): 679 (QDeclarativeWebSettings::setFixedFontFamily): 680 (QDeclarativeWebSettings::serifFontFamily): 681 (QDeclarativeWebSettings::setSerifFontFamily): 682 (QDeclarativeWebSettings::sansSerifFontFamily): 683 (QDeclarativeWebSettings::setSansSerifFontFamily): 684 (QDeclarativeWebSettings::cursiveFontFamily): 685 (QDeclarativeWebSettings::setCursiveFontFamily): 686 (QDeclarativeWebSettings::fantasyFontFamily): 687 (QDeclarativeWebSettings::setFantasyFontFamily): 688 (QDeclarativeWebSettings::minimumFontSize): 689 (QDeclarativeWebSettings::setMinimumFontSize): 690 (QDeclarativeWebSettings::minimumLogicalFontSize): 691 (QDeclarativeWebSettings::setMinimumLogicalFontSize): 692 (QDeclarativeWebSettings::defaultFontSize): 693 (QDeclarativeWebSettings::setDefaultFontSize): 694 (QDeclarativeWebSettings::defaultFixedFontSize): 695 (QDeclarativeWebSettings::setDefaultFixedFontSize): 696 (QDeclarativeWebSettings::autoLoadImages): 697 (QDeclarativeWebSettings::setAutoLoadImages): 698 (QDeclarativeWebSettings::javascriptEnabled): 699 (QDeclarativeWebSettings::setJavascriptEnabled): 700 (QDeclarativeWebSettings::javaEnabled): 701 (QDeclarativeWebSettings::setJavaEnabled): 702 (QDeclarativeWebSettings::pluginsEnabled): 703 (QDeclarativeWebSettings::setPluginsEnabled): 704 (QDeclarativeWebSettings::privateBrowsingEnabled): 705 (QDeclarativeWebSettings::setPrivateBrowsingEnabled): 706 (QDeclarativeWebSettings::javascriptCanOpenWindows): 707 (QDeclarativeWebSettings::setJavascriptCanOpenWindows): 708 (QDeclarativeWebSettings::javascriptCanAccessClipboard): 709 (QDeclarativeWebSettings::setJavascriptCanAccessClipboard): 710 (QDeclarativeWebSettings::developerExtrasEnabled): 711 (QDeclarativeWebSettings::setDeveloperExtrasEnabled): 712 (QDeclarativeWebSettings::linksIncludedInFocusChain): 713 (QDeclarativeWebSettings::setLinksIncludedInFocusChain): 714 (QDeclarativeWebSettings::zoomTextOnly): 715 (QDeclarativeWebSettings::setZoomTextOnly): 716 (QDeclarativeWebSettings::printElementBackgrounds): 717 (QDeclarativeWebSettings::setPrintElementBackgrounds): 718 (QDeclarativeWebSettings::offlineStorageDatabaseEnabled): 719 (QDeclarativeWebSettings::setOfflineStorageDatabaseEnabled): 720 (QDeclarativeWebSettings::offlineWebApplicationCacheEnabled): 721 (QDeclarativeWebSettings::setOfflineWebApplicationCacheEnabled): 722 (QDeclarativeWebSettings::localStorageDatabaseEnabled): 723 (QDeclarativeWebSettings::setLocalStorageDatabaseEnabled): 724 (QDeclarativeWebSettings::localContentCanAccessRemoteUrls): 725 (QDeclarativeWebSettings::setLocalContentCanAccessRemoteUrls): 726 * declarative/qmldir: Added. 727 * docs/qtwebkit.qdocconf: 728 729 2010-06-17 Mark Brand <mabrand@mabrand.nl> 730 731 Reviewed by Simon Hausmann. 732 733 [Qt] use "win32-g++*" scope to match all MinGW makespecs 734 735 The scope "win32-g++" comes from the name of the makespec. However, it 736 is frequently used to check for MinGW. This works fine as long as 737 win32-g++ is the only makespec for MinGW. Now we need the wildcard 738 to cover "win32-g++-cross" as well. 739 740 * Api/DerivedSources.pro: 741 742 2010-05-28 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> 743 744 Reviewed by Simon Hausmann, Antti Koivisto 745 746 [Qt] Add internal Qt Api to configure repaint throttling parameters. 747 https://bugs.webkit.org/show_bug.cgi?id=38401 748 749 * Api/qwebpage.cpp: 750 (QWebPagePrivate::dynamicPropertyChangeEvent): 751 752 2010-06-12 Dawit Alemayehu <adawit@kde.org> 753 754 Reviewed by Kenneth Rohde Christiansen. 755 756 Added an attribute to enable/disable site specific quirks mode in WebKit. 757 The attribute is enabled by default. 758 759 https://bugs.webkit.org/show_bug.cgi?id=40073 760 761 * Api/qwebsettings.cpp: 762 (QWebSettingsPrivate::apply): 763 (QWebSettings::QWebSettings): 764 * Api/qwebsettings.h: 765 766 2010-06-09 Pierre Rossi <pierre.rossi@nokia.com> 767 768 Reviewed by Kenneth Rohde Christiansen. 769 770 QWebPage::findText() does not clear selection when passed empty string 771 https://bugs.webkit.org/show_bug.cgi?id=31779 772 773 * Api/qwebpage.cpp: 774 (QWebPage::findText): 775 * tests/qwebpage/tst_qwebpage.cpp: 776 (tst_QWebPage::findText): 777 778 2010-06-12 No'am Rosenthal <noam.rosenthal@nokia.com> 779 780 Reviewed by Kenneth Rohde Christiansen. 781 782 [Qt] Add documentation to the QtWebkit bridge 783 https://bugs.webkit.org/show_bug.cgi?id=35861 784 785 The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation 786 change. The new patch amends that, with the correct snippets and grammar fixes. 787 788 * docs/qtwebkit-bridge.qdoc: 789 * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: 790 (wrapInFunction): 791 792 2010-06-11 Jesus Sanchez-Palencia <jesus@webkit.org> 793 794 Reviewed by Kenneth Rohde Christiansen. 795 796 [Qt] Typo error in QWebPluginFactory Documentation 797 https://bugs.webkit.org/show_bug.cgi?id=40490 798 799 * Api/qwebpluginfactory.cpp: 800 801 2010-06-10 Andy Shaw <andy.shaw@nokia.com> 802 803 Reviewed by Simon Hausmann. 804 805 REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default 806 https://bugs.webkit.org/show_bug.cgi?id=40401 807 808 The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead 809 of accept(). 810 811 * Api/qwebpage.cpp: 812 (QWebPagePrivate::dragEnterEvent): 813 (QWebPagePrivate::dragMoveEvent): 814 (QWebPagePrivate::dropEvent): 815 816 2010-06-02 Tasuku Suzuki <tasuku.suzuki@nokia.com> 817 818 Reviewed by Shinichiro Hamaji. 819 820 [Qt] Fix compilation with QT_NO_PROPERTIES 821 https://bugs.webkit.org/show_bug.cgi?id=38324 822 823 * Api/qwebpage.cpp: 824 (QWebPage::event): 825 * Api/qwebpage_p.h: 826 * WebCoreSupport/InspectorClientQt.cpp: 827 (WebCore::InspectorClientQt::openInspectorFrontend): 828 829 2010-05-17 Tasuku Suzuki <tasuku.suzuki@nokia.com> 830 831 Reviewed by Kenneth Rohde Christiansen. 832 833 [Qt] Fix compilation with QT_NO_COMBOBOX 834 https://bugs.webkit.org/show_bug.cgi?id=38324 835 836 * WebCoreSupport/ChromeClientQt.cpp: 837 (WebCore::ChromeClientQt::createSelectPopup): 838 * WebCoreSupport/QtFallbackWebPopup.cpp: 839 * WebCoreSupport/QtFallbackWebPopup.h: 840 841 2010-05-02 Tasuku Suzuki <tasuku.suzuki@nokia.com> 842 843 Reviewed by Simon Hausmann. 844 845 [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT 846 https://bugs.webkit.org/show_bug.cgi?id=38324 847 848 * Api/qwebsettings.cpp: 849 850 2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> 851 852 Reviewed by Laszlo Gombos. 853 854 Auto-uppercase and predictive text need to be disabled for S60 (as for maemo) 855 https://bugs.webkit.org/show_bug.cgi?id=33176 856 857 * WebCoreSupport/EditorClientQt.cpp: 858 859 2010-06-01 Noam Rosenthal <noam.rosenthal@nokia.com> 860 861 Reviewed by Kenneth Rohde Christiansen. 862 863 [Qt] Add documentation to the QtWebkit bridge 864 https://bugs.webkit.org/show_bug.cgi?id=35861 865 866 This patch includes comprehensive qdoc documentation for the QtWebkit bridge. 867 868 * docs/qtwebkit-bridge.qdoc: Added. 869 * docs/qtwebkit.qdoc: 870 * docs/webkitsnippets/doc_src_qtscript.qdoc: Added. 871 * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: Added. 872 (wrapInFunction): 873 874 2010-06-01 Simon Hausmann <simon.hausmann@nokia.com> 875 876 Reviewed by Laszlo Gombos. 877 878 [Qt] Rename versioning .pri file to what Qt's mkspecs/features/qt.pri expects. 879 880 * qt_webkit_version.pri: Renamed from WebKit/qt/qtwebkit_version.pri. 881 882 2010-05-31 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> 883 884 Reviewed by Simon Hausmann. 885 886 [Qt] Escape backslashes in the .pro files 887 888 qmake in Qt 4.7 warns about unescaped backspaces and deprecates them. 889 890 * Api/DerivedSources.pro: 891 * docs/docs.pri: 892 1 893 2010-05-19 Denis Dzyubenko <denis.dzyubenko@nokia.com> 2 894 … … 8 900 * Api/qwebpage.cpp: 9 901 (QWebPage::userAgentForUrl): 902 903 2010-05-28 Antti Koivisto <koivisto@iki.fi> 904 905 Reviewed by Kenneth Rohde Christiansen. 906 907 Add a missing #if ENABLE(), some null checking. 908 909 * Api/qwebpage.cpp: 910 (QWebPagePrivate::dynamicPropertyChangeEvent): 911 912 2010-05-28 Antti Koivisto <koivisto@iki.fi> 913 914 Reviewed by Kenneth Rohde Christiansen. 915 916 https://bugs.webkit.org/show_bug.cgi?id=39874 917 [Qt] Make tiled backing store more configurable 918 919 Make tile size, tile creation delay and tiling area dynamically configurable. 920 921 * Api/qwebpage.cpp: 922 (QWebPagePrivate::dynamicPropertyChangeEvent): 923 924 2010-05-29 Dawit Alemayehu <adawit@kde.org> 925 926 Reviewed by Kenneth Rohde Christiansen. 927 928 Added a WebAction to stop all pending page refresh/redirect 929 requests set through the <meta http-equiv="refresh"...> tag. 930 931 https://bugs.webkit.org/show_bug.cgi?id=29899 932 933 * Api/qwebpage.cpp: 934 (QWebPage::triggerAction): 935 * Api/qwebpage.h: 936 * tests/qwebpage/tst_qwebpage.cpp: 937 (tst_QWebPage::testStopScheduledPageRefresh): 938 939 2010-04-20 Robert Hogan <robert@webkit.org> 940 941 Reviewed by Simon Hausmann. 942 943 [Qt] Add more support for textInputController 944 945 Add support for selectedRange(), setMarkedText(), insertText(), 946 and firstRectForCharacterRange(). 947 948 https://bugs.webkit.org/show_bug.cgi?id=35702 949 950 * Api/qwebpage.cpp: 951 (QWebPagePrivate::inputMethodEvent): 952 * tests/qwebpage/tst_qwebpage.cpp: 953 (tst_QWebPage::inputMethods): 954 955 2010-05-20 Janne Koskinen <janne.p.koskinen@digia.com> 956 957 Reviewed by Kenneth Rohde Christiansen. 958 959 [Qt] WINSCW compile fix for qwebframe test 960 https://bugs.webkit.org/show_bug.cgi?id=38722 961 962 WINSCW cannot determine template type up the hierarchy 963 to common base class. 964 965 * tests/qwebframe/tst_qwebframe.cpp: 966 967 2010-05-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> 968 969 Reviewed by Kenneth Rohde Christiansen. 970 971 [Qt] Update the Symbian version for the user agent 972 https://bugs.webkit.org/show_bug.cgi?id=38389 973 974 Fixes a regression introduced by r58648. Ensure that the "Symbian" string 975 is only listed one time in the User Agent string. 976 977 In addition make an effort to align the User Agent string to already 978 released WebKit based products for Symbian. 979 980 * Api/qwebpage.cpp: 981 (QWebPage::userAgentForUrl): 982 983 2010-05-21 Simon Hausmann <simon.hausmann@nokia.com> 984 985 Symbian build fix. 986 987 [Qt] Updated the wins def file with one new export. 988 989 The DRT symbols are still missing, but I can't build DRT ;( 990 991 * symbian/bwins/QtWebKitu.def: 992 993 2010-05-12 Simon Hausmann <simon.hausmann@nokia.com> 994 995 Reviewed by Laszlo Gombos. 996 997 Add a comment to explain the web inspector dynamic property url hook 998 and that it's there on purpose :) 999 1000 https://bugs.webkit.org/show_bug.cgi?id=35340 1001 1002 * WebCoreSupport/InspectorClientQt.cpp: 1003 (WebCore::InspectorClientQt::openInspectorFrontend): 1004 1005 2010-05-06 Simon Hausmann <simon.hausmann@nokia.com> 1006 1007 Reviewed by Kenneth Rohde Christiansen. 1008 1009 [Qt] Replace public inspector url with private property for QtLauncher 1010 https://bugs.webkit.org/show_bug.cgi?id=35340 1011 1012 Replace the public API with a private dynamic property until this feature 1013 is ready. 1014 1015 * Api/qwebsettings.cpp: 1016 * Api/qwebsettings.h: 1017 * WebCoreSupport/InspectorClientQt.cpp: 1018 (WebCore::InspectorClientQt::openInspectorFrontend): 1019 * symbian/bwins/QtWebKitu.def: 1020 * symbian/eabi/QtWebKitu.def: 1021 1022 2010-05-20 Luiz Agostini <luiz.agostini@openbossa.org> 1023 1024 Reviewed by Kenneth Rohde Christiansen. 1025 1026 [Qt] Skipping popup focus test for maemo 1027 https://bugs.webkit.org/show_bug.cgi?id=39314 1028 1029 Skipping popup focus test for maemo in qwebframe auto test. 1030 1031 The test method tst_QWebFrame::popupFocus() was testing popup focus AND input 1032 field focus. The input field focus has been removed from the method popupFocus() 1033 and a new test method named inputFieldFocus() has been added. Finally the test 1034 method popupFocus() has been skipped for maemo. 1035 1036 * tests/qwebframe/tst_qwebframe.cpp: 1037 1038 2010-05-20 Rajiv Ramanasankaran <rajiv.ramanasankaran@nokia.com> 1039 1040 Reviewed by Simon Hausmann. 1041 1042 [Qt] QWebPage::inputMethodQuery() returns wrong values for Qt::ImCursorPosition, Qt::ImAnchorPosition 1043 https://bugs.webkit.org/show_bug.cgi?id=38779 1044 1045 The earlier implementation was written with the assumption that in this scenario the 1046 anchor position always corresponds to the START index and that the current cursor position 1047 always corresponds to the END index in WebKit. 1048 1049 Updated the implementation of QWebPage::inputMethodQuery(Qt::ImCursorPosition) and 1050 QWebPage::inputMethodQuery(Qt::ImAnchorPosition) for the case where the Editor is not in 1051 composition mode. In the non-composition mode, the Anchor and the Current cursor positions 1052 correspond to the Base and Extent position offsets in WebKit. 1053 1054 Also added the auto-tests for the RIGHT to LEFT and LEFT to RIGHT selections. 1055 1056 * Api/qwebpage.cpp: 1057 (QWebPage::inputMethodQuery): Now returning correct values for Qt::ImCursorPosition and 1058 Qt::ImAnchorPosition when the Editor is not in composition mode. 1059 * tests/qwebpage/tst_qwebpage.cpp: 1060 (tst_QWebPage::inputMethods): Added auto-tests for RIGHT to LEFT and LEFT to RIGHT selections 10 1061 11 1062 2010-05-12 Joe Ligman <joseph.ligman@nokia.com> … … 25 1076 (qtwebkit_webframe_scrollRecursively): 26 1077 1078 2010-05-17 Antti Koivisto <koivisto@iki.fi> 1079 1080 Reviewed by Kenneth Rohde Christiansen. 1081 1082 https://bugs.webkit.org/show_bug.cgi?id=39218 1083 [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation 1084 1085 Tiles sometimes flicker when exiting a zoom animation. This happens as a result 1086 of the visible rectangle being momentarily out of sync. 1087 1088 Instead of updating the visible rect by explicitly setting it, pull it through 1089 the client and recompute in WebKit the level. 1090 1091 * Api/qgraphicswebview.cpp: 1092 (QGraphicsWebView::paint): 1093 * WebCoreSupport/ChromeClientQt.cpp: 1094 (WebCore::ChromeClientQt::visibleRectForTiledBackingStore): 1095 * WebCoreSupport/ChromeClientQt.h: 1096 1097 2010-05-18 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> 1098 1099 Reviewed by Simon Hausmann. 1100 1101 Fix QWebHistory serialization. 1102 1103 Regression was caused by bug 33224. The streaming function 1104 should generate a documentSequenceNumber for all loaded values. 1105 1106 [Qt] tst_QWebHistory::serialize_2() fails 1107 https://bugs.webkit.org/show_bug.cgi?id=37322 1108 1109 * Api/qwebhistory.cpp: 1110 (operator>>): 1111 1112 2010-05-14 Kent Hansen <kent.hansen@nokia.com>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Tor Arne VestbÞ <tor.arne.vestbo@nokia.com>, Henry Haverinen <henry.haverinen@nokia.com>, Jedrzej Nowacki <jedrzej.nowacki@nokia.com>, Andreas Kling <andreas.kling@nokia.com> 1113 1114 Reviewed by Simon Hausmann. 1115 1116 [Qt] Merge overhaul of the QtWebKit API documentation 1117 1118 Numerous improvements in wording, qdoc warning fixes and 1119 clarifications, done in a team work effort. 1120 1121 No functional changes. 1122 1123 * Api/qwebdatabase.cpp: 1124 * Api/qwebelement.cpp: 1125 * Api/qwebframe.cpp: 1126 * Api/qwebhistoryinterface.cpp: 1127 * Api/qwebinspector.cpp: 1128 * Api/qwebkitversion.cpp: 1129 * Api/qwebpage.cpp: 1130 * Api/qwebpluginfactory.cpp: 1131 * Api/qwebsecurityorigin.cpp: 1132 * Api/qwebsettings.cpp: 1133 * Api/qwebsettings.h: 1134 * docs/qtwebkit.qdoc: 1135 * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp: 1136 (wrapInFunction): 1137 * docs/webkitsnippets/webelement/main.cpp: 1138 (findButtonAndClick): 1139 (autocomplete1): 1140 (autocomplete2): 1141 (main): 1142 1143 2010-05-14 Martin Smith <msmith@trolltech.com> 1144 1145 Reviewed by Simon Hausmann. 1146 1147 Documentation: Fix overview grouping. 1148 1149 * docs/qtwebkit.qdoc: 1150 1151 2010-05-14 Benjamin Poulain <benjamin.poulain@nokia.com> 1152 1153 Reviewed by Laszlo Gombos. 1154 1155 [QT] Update the Symbian version for the user agent 1156 https://bugs.webkit.org/show_bug.cgi?id=38389 1157 1158 Update the user agent for Symbian^2 to Symbian^4 1159 1160 * Api/qwebpage.cpp: 1161 (QWebPage::userAgentForUrl): 1162 1163 2010-05-11 Antonio Gomes <tonikitoo@webkit.org> 1164 1165 Reviewed by Kenneth Christiansen. 1166 1167 [Qt] emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout 1168 https://bugs.webkit.org/show_bug.cgi?id=38921 1169 1170 Emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout 1171 instead of FrameLoaderClientQt::dispatchDidFirstLayout , because the former ensures that a 1172 visual content layed out on the frame. 1173 1174 It matches to QWebFrame::initialLayoutCompleted signal documentation at: 1175 1176 "... This is the first time you will see contents displayed on the frame ..." 1177 1178 * WebCoreSupport/FrameLoaderClientQt.cpp: 1179 (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout): 1180 (WebCore::FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout): 1181 1182 2010-05-11 Kenneth Rohde Christiansen <kenneth@webkit.org> 1183 1184 Reviewed by Laszlo Gombos. 1185 1186 [Qt] REGRESSION(r58497) tst_QGraphicsWebView::crashOnViewlessWebPages() is failing 1187 https://bugs.webkit.org/show_bug.cgi?id=38655 1188 1189 Fix double free by moving the connect till after the resize. 1190 1191 The bug is causes by the fact that a resize of an empty page causes a 1192 layout, thus deleting the qgraphicswebview before setHtml is called, 1193 which then deletes it again, causing a double free. 1194 1195 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 1196 (tst_QGraphicsWebView::crashOnViewlessWebPages): 1197 1198 2010-05-11 Diego Gonzalez <diegohcg@webkit.org> 1199 1200 Reviewed by Kenneth Rohde Christiansen. 1201 1202 [Qt] tst_QWebPage::inputMethods failing on Maemo5 1203 https://bugs.webkit.org/show_bug.cgi?id=38685 1204 1205 Check if the SIP (Software Input Panel) is triggered, which normally 1206 happens on mobile platforms, when a user input form receives a mouse click. 1207 1208 * tests/qwebpage/tst_qwebpage.cpp: 1209 (tst_QWebPage::inputMethods): 1210 1211 2010-05-09 Noam Rosenthal <noam.rosenthal@nokia.com> 1212 1213 Reviewed by Kenneth Rohde Christiansen. 1214 1215 [Qt] Crash in QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate when animation were used 1216 https://bugs.webkit.org/show_bug.cgi?id=38574 1217 1218 The fix uses a QWeakPointer for rootGraphicsLayer, protecting from a crash in case the layer is deleted before the QGraphicsWebView. 1219 1220 * Api/qgraphicswebview.cpp: 1221 (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): 1222 (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): 1223 (QGraphicsWebViewPrivate::setRootGraphicsLayer): 1224 (QGraphicsWebViewPrivate::updateCompositingScrollPosition): 1225 1226 2010-05-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> 1227 1228 Reviewed by Simon Hausmann. 1229 1230 [Qt] Expose HTMLTokenizer yielding parameters 1231 https://bugs.webkit.org/show_bug.cgi?id=37023 1232 1233 Enables to set TimeDelay and ChunkSize for 1234 HTMLTokenizer. 1235 1236 * Api/qwebpage.cpp: 1237 (QWebPagePrivate::dynamicPropertyChangeEvent): 1238 1239 2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> 1240 1241 Reviewed by Kenneth Rohde Christiansen. 1242 1243 [Qt] QWebPage viewMode property 1244 https://bugs.webkit.org/show_bug.cgi?id=38119 1245 1246 Rename the property from wrt_viewMode to _q_viewMode. 1247 1248 * Api/qwebpage.cpp: 1249 (QWebPagePrivate::dynamicPropertyChangeEvent): 1250 * tests/qwebpage/tst_qwebpage.cpp: 1251 (tst_QWebPage::viewModes): 1252 1253 2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org> 1254 1255 Reviewed by Kenneth Rohde Christiansen. 1256 1257 [Qt] QWebPage viewMode property 1258 https://bugs.webkit.org/show_bug.cgi?id=38119 1259 1260 Replacing method qt_wrt_setViewMode by wrt_viewMode property. 1261 1262 * Api/qwebpage.cpp: 1263 (QWebPagePrivate::dynamicPropertyChangeEvent): 1264 (QWebPage::event): 1265 * Api/qwebpage_p.h: 1266 * tests/qwebpage/tst_qwebpage.cpp: 1267 (tst_QWebPage::wrt_viewModes): 1268 1269 2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> 1270 1271 Reviewed by Simon Hausmann. 1272 1273 [Qt]Fix compile error with QT_NO_IM 1274 https://bugs.webkit.org/show_bug.cgi?id=36533 1275 1276 * WebCoreSupport/QtFallbackWebPopup.cpp: 1277 (WebCore::QtFallbackWebPopupCombo::hidePopup): 1278 1279 2010-04-02 Tasuku Suzuki <tasuku.suzuki@nokia.com> 1280 1281 Reviewed by Eric Seidel. 1282 1283 [Qt]Fix compile error with QT_NO_SETTINGS 1284 https://bugs.webkit.org/show_bug.cgi?id=36533 1285 1286 If QT_NO_SETTINGS is defined, QSettings is not available. 1287 1288 * WebCoreSupport/InspectorClientQt.cpp: 1289 (WebCore::InspectorClientQt::populateSetting): 1290 (WebCore::InspectorClientQt::storeSetting): 1291 1292 2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com> 1293 1294 Reviewed by Eric Seidel. 1295 1296 [Qt]Fix compile error with QT_NO_DESKTOPSERVICES 1297 https://bugs.webkit.org/show_bug.cgi?id=36533 1298 1299 * Api/qwebsettings.cpp: 1300 (QWebSettings::enablePersistentStorage): 1301 1302 2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com> 1303 1304 Reviewed by Eric Seidel. 1305 1306 [Qt]Fix compile error with QT_NO_DEBUG_STREAM 1307 https://bugs.webkit.org/show_bug.cgi?id=36533 1308 1309 * Api/qgraphicswebview.cpp: 1310 (QGraphicsWebViewPrivate::graphicsItemVisibleRect): 1311 1312 2010-04-29 Janne Koskinen <janne.p.koskinen@digia.com> 1313 1314 Reviewed by Simon Hausmann. 1315 1316 [Qt] QtWebKit versioning added 1317 https://bugs.webkit.org/show_bug.cgi?id=37207 1318 1319 QtWebkit releases separated from Qt release cycle. 1320 1321 * qtwebkit_version.pri: Added. 1322 1323 2010-05-02 Benjamin Poulain <benjamin.poulain@nokia.com> 1324 1325 Reviewed by Kenneth Rohde Christiansen. 1326 1327 [Qt] QWebPage::userAgentForUrl is terrible API 1328 https://bugs.webkit.org/show_bug.cgi?id=33875 1329 1330 Simplify the creation of the user agent string to avoid some 1331 overhead for each loaded url. 1332 1333 The static part of the user agent is cached so it only have 1334 to be made once. 1335 This creation has been made in order to simplify the code. 1336 1337 The two variable: application name and current language are 1338 set dynamically when needed. 1339 The default locale is non longer created if the widget locale 1340 is used. 1341 1342 * Api/qwebpage.cpp: 1343 (QWebPage::userAgentForUrl): 1344 * tests/qwebpage/tst_qwebpage.cpp: 1345 (tst_QWebPage::userAgentApplicationName): 1346 (tst_QWebPage::userAgentLocaleChange): 1347 1348 2010-05-02 Noam Rosenthal <noam.rosenthal@nokia.com> 1349 1350 Reviewed by Kenneth Rohde Christiansen. 1351 1352 [Qt] GraphicsLayer: animation incorrect when scrolling 1353 https://bugs.webkit.org/show_bug.cgi?id=38371 1354 1355 This is a regression introduced with the invalidate-on-scroll code path, that uses QGraphicsWebViewPrivate::update() 1356 instead of QGraphicsWebViewPrivate::scroll(). The patch makes sure that the scrolling position is correct on 1357 each content update - this shouldn't have a performance impact - the only overhead is an additional value-test on each update. 1358 1359 Tested by http://www.the-art-of-web.com/css/css-animation/ 1360 1361 * Api/qgraphicswebview.cpp: 1362 (QGraphicsWebViewPrivate::update): 1363 1364 2010-04-29 Andreas Kling <andreas.kling@nokia.com> 1365 1366 Reviewed by Simon Hausmann. 1367 1368 Remove unnecessary call to FrameView::forceLayout() in setViewportSize() 1369 This prevents a double relayout on resize. 1370 1371 https://bugs.webkit.org/show_bug.cgi?id=38179 1372 1373 Thanks to Nate Whetsell <nathan.whetsell@gmail.com> for spotting this. 1374 1375 * Api/qwebpage.cpp: 1376 (QWebPage::setViewportSize): 1377 1378 2010-04-29 Simon Hausmann <simon.hausmann@nokia.com> 1379 1380 Reviewed by Tor Arne VestbÞ. 1381 1382 [Qt] REGRESSION(r57982): tst_qwebpage::showModalDialog() crashes 1383 https://bugs.webkit.org/show_bug.cgi?id=38314 1384 1385 Make sure that there's always a main frame when returning from createWindow() 1386 to the caller in WebCore. 1387 1388 * WebCoreSupport/ChromeClientQt.cpp: 1389 (WebCore::ChromeClientQt::createWindow): 1390 1391 2010-04-28 Janne Koskinen <janne.p.koskinen@digia.com> 1392 1393 Reviewed by Simon Hausmann <simon.hausmann@nokia.com> 1394 1395 [Qt] WINS DEF file freeze 1396 1397 Updated WINSCW def file with added and removed symbols. 1398 1399 * symbian/bwins/QtWebKitu.def: 1400 1401 2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 1402 1403 Reviewed by Kenneth Rohde Christiansen. 1404 1405 [Qt] Remove translatable strings from the hybridPixmap test. 1406 https://bugs.webkit.org/show_bug.cgi?id=37867 1407 1408 * tests/hybridPixmap/widget.ui: 1409 1410 2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 1411 1412 Reviewed by Kenneth Rohde Christiansen. 1413 1414 [Qt] Fix autotests .qrc file paths when built in Qt. 1415 1416 Compiling auto-tests from qt/tests/auto/qweb* produced 1417 failing tests since these .pro files include the 1418 ones in WebKit/qt/tests and the .qrc file was 1419 not added to RESOURCES 1420 1421 * tests/benchmarks/loading/loading.pro: 1422 * tests/benchmarks/painting/painting.pro: 1423 * tests/qgraphicswebview/qgraphicswebview.pro: 1424 * tests/qwebelement/qwebelement.pro: 1425 * tests/qwebframe/qwebframe.pro: 1426 * tests/qwebhistory/qwebhistory.pro: 1427 * tests/qwebhistoryinterface/qwebhistoryinterface.pro: 1428 * tests/qwebinspector/qwebinspector.pro: 1429 * tests/qwebpage/qwebpage.pro: 1430 * tests/qwebplugindatabase/qwebplugindatabase.pro: 1431 * tests/qwebview/qwebview.pro: 1432 * tests/tests.pri: 1433 1434 2010-04-26 Bruno Schmidt <bruno.schmidt@gmail.com> 1435 1436 Reviewed by Kenneth Rohde Christiansen. 1437 1438 [Qt] Exposing an QVariantMap containing QObjectStar to Javascript 1439 causes Segmentation Fault 1440 https://bugs.webkit.org/show_bug.cgi?id=34729 1441 1442 If an QVariantMap containing QObjectStar is added to the to QtWebkit 1443 Javascript, it's use causes Segmentation Fault. 1444 It happens because, in the case QMetaType::QVariantMap, the "root" 1445 object that is inside of a PassRefPtr is passed recursively inside a 1446 loop to recover the content of the map, but the PassRefPtr semantics 1447 prohibit its use inside a loop, so the "root" object mus be passed 1448 using the method "PassRefPtr::get" in order to keep the current 1449 reference. 1450 1451 * tests/qwebframe/tst_qwebframe.cpp: 1452 (MyQObject::MyQObject): new property variantMapProperty 1453 (MyQObject::variantMapProperty): read variantMapProperty 1454 (MyQObject::setVariantMapProperty): write variantMapProperty 1455 27 1456 2010-04-26 Thiago Macieira <thiago.macieira@nokia.com> 28 1457 … … 35 1464 36 1465 * Api/qwebkitversion.h: 1466 1467 2010-04-21 Yi Shen <yi.4.shen@nokia.com> 1468 1469 Reviewed by Simon Hausmann. 1470 1471 [Qt] Check the request empty or not in ChromeClientQt::createWindow() 1472 https://bugs.webkit.org/show_bug.cgi?id=37821 1473 1474 * WebCoreSupport/ChromeClientQt.cpp: 1475 (WebCore::ChromeClientQt::createWindow): 1476 1477 2010-04-22 John Pavan <john.pavan@nokia.com> 1478 1479 Reviewed by Laszlo Gombos. 1480 1481 [Qt] inputMethodQuery returns coordinates in web page coordinates rather than in item coordinates. 1482 https://bugs.webkit.org/show_bug.cgi?id=37163 1483 1484 1485 QWebPage::inputMethodQuery is modified so that it 1486 returns coordinates in the widget's coordinate system. 1487 Tests are added for QGraphicsWebView and QWebView 1488 to verify that this behavior is correct after the webpage 1489 has been scrolled. 1490 1491 * Api/qwebpage.cpp: 1492 (QWebPage::inputMethodQuery): 1493 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 1494 (tst_QGraphicsWebView::microFocusCoordinates): 1495 * tests/qwebview/tst_qwebview.cpp: 1496 (tst_QWebView::microFocusCoordinates): 1497 1498 2010-04-21 No'am Rosenthal <noam.rosenthal@nokia.com> 1499 1500 Reviewed by Simon Fraser. 1501 1502 [Qt] Fix or remove the runtime flag for accelerated compositing. 1503 https://bugs.webkit.org/show_bug.cgi?id=37313 1504 1505 This lets the QWebPageClient "veto" the settings value for accelerated compositing. 1506 In this case we allow accelerated compositing only on QGraphicsWebView. 1507 1508 * Api/qgraphicswebview.cpp: 1509 (QGraphicsWebViewPrivate::allowsAcceleratedCompositing): 1510 * WebCoreSupport/ChromeClientQt.cpp: 1511 (WebCore::ChromeClientQt::allowsAcceleratedCompositing): 1512 * WebCoreSupport/ChromeClientQt.h: 1513 1514 2010-04-22 Robert Hogan <robert@webkit.org> 1515 1516 Reviewed by Simon Hausmann. 1517 1518 [Qt] Fix createPlugin() tests in tst_qwebpage to match behaviour of Qt plugins 1519 when PluginsEnabled is false. 1520 1521 tst_qwebpage should have been updated as part of r56662. 1522 (See https://bugs.webkit.org/show_bug.cgi?id=32196) 1523 1524 Updated documentation of QWebPage::createPlugin and QWebSetting::pluginsEnabled 1525 to match the new behaviour. 1526 1527 * Api/qwebpage.cpp: Update docs. 1528 * Api/qwebsettings.cpp: Update docs. 1529 * tests/qwebpage/tst_qwebpage.cpp: 1530 (createPlugin): 1531 (tst_QWebPage::createPluginWithPluginsEnabled): 1532 (tst_QWebPage::createPluginWithPluginsDisabled): 1533 1534 2010-04-09 Antonio Gomes <tonikitoo@webkit.org> 1535 1536 Reviewed by Kenneth Christiansen and Tor Arne VestbÞ. 1537 1538 REGRESSION(r56552): Broken scrollbars size 1539 https://bugs.webkit.org/show_bug.cgi?id=36853 1540 1541 The regression was caused by r56552, which introduced a fix to bug 1542 webkit.org/b/21300. The bug solved an issue with the resize handle on mac, 1543 but did it in a way that affected all Qt platforms and thus broke the behavior 1544 on non-mac platforms. 1545 1546 This patch makes the mac specific change ifdef'ed and only applied for the mac 1547 platform. 1548 1549 * WebCoreSupport/ChromeClientQt.cpp: 1550 (WebCore::ChromeClientQt::windowResizerRect): 1551 1552 2010-04-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 1553 1554 Reviewed by Simon Hausmann. 1555 1556 [Qt] Fix compilation against namespaced Qt. 1557 1558 * WebCoreSupport/ChromeClientQt.h: 1559 * WebCoreSupport/QtFallbackWebPopup.h: 1560 1561 2010-04-14 Luiz Agostini <luiz.agostini@openbossa.org> 1562 1563 Reviewed by Kenneth Rohde Christiansen. 1564 1565 Changing view mode names due to specification changes 1566 https://bugs.webkit.org/show_bug.cgi?id=37615 1567 1568 test: fast/media/media-feature-wgt-view-mode.html 1569 1570 specification: http://dev.w3.org/2006/waf/widgets-vmmf/ 1571 1572 * WebCoreSupport/ChromeClientQt.cpp: 1573 (WebCore::ChromeClientQt::isWindowed): 1574 (WebCore::ChromeClientQt::isFullscreen): 1575 (WebCore::ChromeClientQt::isMaximized): 1576 (WebCore::ChromeClientQt::isMinimized): 1577 * WebCoreSupport/ChromeClientQt.h: 1578 1579 2010-04-14 Andreas Kling <andreas.kling@nokia.com> 1580 1581 Reviewed by Kenneth Rohde Christiansen. 1582 1583 [Qt] Rendering artifacts on Qt plugins when scrolling the page 1584 https://bugs.webkit.org/show_bug.cgi?id=37152 1585 1586 Because we no longer repaint the entire viewport on scroll, 1587 we must trigger a repaint of QtPluginWidgets when their geometry changes. 1588 1589 * WebCoreSupport/FrameLoaderClientQt.cpp: 1590 1591 2010-04-09 Yi Shen <yi.4.shen@nokia.com> 1592 1593 Reviewed by Kenneth Rohde Christiansen. 1594 1595 [Qt] tst_QWebFrame::popupFocus() fails 1596 https://bugs.webkit.org/show_bug.cgi?id=37320 1597 1598 The QWebPopup class has been moved & renamed, so tst_QWebFrame::popupFocus() should use 1599 the class name "QComboBox", rather than "WebCore::QWebPopup" to find the popup menu. 1600 1601 * tests/qwebframe/tst_qwebframe.cpp: 1602 1603 2010-04-15 Bruno Schmidt <bruno.schmidt@gmail.com> 1604 1605 Reviewed by Kenneth Rohde Christiansen. 1606 1607 [Qt] Null QObjects properties cause Segmentation Fault 1608 https://bugs.webkit.org/show_bug.cgi?id=34730 1609 1610 QObjects exported to the QWebkit javascript with properties that are 1611 a null "QObject*" cause Segmentation Fault. 1612 1613 If an QObject is added to the javascript context and it contains 1614 properties of the type QObject* with NULL value, calling the property 1615 causes Segmentation Fault. 1616 1617 Follow the tests for the corrections done over WebCore. 1618 1619 * tests/qwebframe/tst_qwebframe.cpp: 1620 (MyQObject::MyQObject): init the field m_objectStar 1621 (MyQObject::objectStarProperty): read the Object* prop 1622 (MyQObject::setObjectStarProperty): write the Object* prop 1623 (tst_QWebFrame::getSetStaticProperty): new tests for the new prop 1624 1625 2010-04-15 Kent Hansen <kent.hansen@nokia.com> 1626 1627 Reviewed by Kenneth Rohde Christiansen. 1628 1629 [Qt] Mark QWebFrame::overloadedSlots autotest as expected failure 1630 1631 https://bugs.webkit.org/show_bug.cgi?id=37319 1632 1633 * tests/qwebframe/tst_qwebframe.cpp: 1634 1635 2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> 1636 1637 Reviewed by Simon Hausmann. 1638 1639 [Qt] Fix compile error with QT_NO_ACTION 1640 https://bugs.webkit.org/show_bug.cgi?id=36529 1641 1642 Make sure QT_NO_ACTION is not defined to use QAction 1643 1644 * Api/qgraphicswebview.cpp: 1645 (QGraphicsWebView::pageAction): 1646 * Api/qwebpage.cpp: 1647 (QWebPagePrivate::updateAction): 1648 (QWebPage::updatePositionDependentActions): 1649 * Api/qwebpage.h: 1650 * Api/qwebview.cpp: 1651 * Api/qwebview.h: 1652 1653 2010-04-09 Simon Hausmann <simon.hausmann@nokia.com> 1654 1655 Reviewed by Lars Knoll. 1656 1657 [Qt] tests/qgraphicswebview fails 1658 https://bugs.webkit.org/show_bug.cgi?id=37317 1659 1660 * Api/qwebpage.cpp: 1661 (QWebPage::userAgentForUrl): Don't crash if the ownerWidget is null. 1662 1663 2010-04-08 Benjamin Poulain <benjamin.poulain@nokia.com> 1664 1665 Reviewed by Simon Hausmann. 1666 1667 [Qt] Warnings when compiling InspectorClientQt.cpp 1668 https://bugs.webkit.org/show_bug.cgi?id=37266 1669 1670 Add a default: for the switch()-case to avoid 1671 warnings. 1672 1673 * WebCoreSupport/InspectorClientQt.cpp: 1674 (WebCore::variantToSetting): 1675 1676 2010-04-08 Joe Ligman <joseph.ligman@nokia.com> 1677 1678 Reviewed by Simon Hausmann. 1679 1680 [Qt] WebKit crashes while input text through input method. 1681 The formatted text underline painting crashes when painting with invalid indexes. 1682 https://bugs.webkit.org/show_bug.cgi?id=36870 1683 1684 * Api/qwebpage.cpp: 1685 (QWebPagePrivate::inputMethodEvent): 1686 * tests/qwebpage/tst_qwebpage.cpp: 1687 (tst_QWebPage::inputMethodsTextFormat_data): 1688 (tst_QWebPage::inputMethodsTextFormat): 1689 1690 2010-04-01 Antonio Gomes <tonikitoo@webkit.org> 1691 1692 Reviewed by David Hyatt. 1693 1694 [Qt] REGRESSION:(r50665) QWebFrame::setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff) has no effect. 1695 https://bugs.webkit.org/show_bug.cgi?id=29431 1696 1697 Make use of the new lock parameter of set{Vertical,Horizontal}ScrollbarMode. 1698 1699 Always added a qt auto test for set scrollbar policy feature. 1700 1701 * Api/qwebframe.cpp: 1702 (QWebFrame::setScrollBarPolicy): 1703 * tests/qwebframe/tst_qwebframe.cpp: 1704 * WebCoreSupport/FrameLoaderClientQt.cpp: 1705 (FrameLoaderClientQt::transitionToCommittedForNewPage): 37 1706 38 1707 2010-04-08 Joe Ligman <joseph.ligman@nokia.com> … … 53 1722 (qtwebkit_webframe_scrollRecursively): 54 1723 55 2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> 56 57 Reviewed by Laszlo Gombos. 58 59 Auto-uppercase and predictive text need to be disabled for S60 (as for maemo) 60 https://bugs.webkit.org/show_bug.cgi?id=33176 61 62 * WebCoreSupport/EditorClientQt.cpp: 63 64 2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org> 65 66 Reviewed by Simon Hausmann. 67 68 [Qt] Don't construct a QLineEdit every time when painting a text field 69 https://bugs.webkit.org/show_bug.cgi?id=36373 70 71 Add a simple benchmark covering this area. 72 73 * tests/benchmarks/painting/tst_painting.cpp: 74 (tst_Painting::textAreas): 75 76 2010-03-22 Yi Shen <shenyi2006@gmail.com> 77 78 Reviewed by Simon Hausmann. 79 80 https://bugs.webkit.org/show_bug.cgi?id=35933 81 [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard 82 Make sure the selection start index is smaller than the selection end index. 83 84 * Api/qwebpage.cpp: 85 (QWebPagePrivate::inputMethodEvent): 86 * tests/qwebpage/tst_qwebpage.cpp: 87 (tst_QWebPage::inputMethods): 1724 2010-04-07 Andreas Kling <andreas.kling@nokia.com> 1725 1726 Reviewed by Simon Hausmann. 1727 1728 [Qt] When providing a widget for the PDF mime type it will cause a crash 1729 1730 m_pluginView may actually be a Widget (for embedded Qt widgets), 1731 so always check isPluginView() before calling PluginView specific methods. 1732 1733 https://bugs.webkit.org/show_bug.cgi?id=29450 1734 1735 * WebCoreSupport/FrameLoaderClientQt.cpp: 1736 (WebCore::FrameLoaderClientQt::finishedLoading): 1737 (WebCore::FrameLoaderClientQt::setMainDocumentError): 1738 (WebCore::FrameLoaderClientQt::committedLoad): 1739 1740 2010-04-07 Dawit Alemayehu <adawit@kde.org> 1741 1742 Reviewed by Simon Hausmann. 1743 1744 https://bugs.webkit.org/show_bug.cgi?id=36827 1745 1746 Updated the WebCore::shouldTreatAsAttachement function call with the 1747 new more generic replacement WebCore::contentDispositionType. 1748 1749 See comments 39-42 in https://bugs.webkit.org/show_bug.cgi?id=36395 1750 1751 * WebCoreSupport/FrameLoaderClientQt.cpp: 1752 (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): 1753 1754 2010-04-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> 1755 1756 Reviewed by Kenneth Rohde Christiansen. 1757 1758 [Qt] [Symbian] Rebaseline Symbian def file 1759 https://bugs.webkit.org/show_bug.cgi?id=37038 1760 1761 Switch the ordinal numbers for qtwebkit_webframe_scrollRecursively 1762 and QWebInspector::closeEvent to match QtWebkit 4.6 branch 1763 1764 Fix the signature for qt_drt_setFrameFlatteningEnabled 1765 after r56718. 1766 1767 Add new QtWebKit API symbols introduced not listed in the file yet. 1768 1769 * symbian/eabi/QtWebKitu.def: 1770 1771 2010-04-06 Diego Gonzalez <diego.gonzalez@openbossa.org> 1772 1773 Reviewed by Simon Hausmann. 1774 1775 [Qt] Add mechanism to detect QtWebKit 2.0 via the preprocessor 1776 https://bugs.webkit.org/show_bug.cgi?id=36538 1777 1778 * Api/qwebkitglobal.h: 1779 1780 2010-04-02 Luiz Agostini <luiz.agostini@openbossa.org> 1781 1782 Reviewed by Kenneth Rohde Christiansen. 1783 1784 [Qt] Maemo5 theme - customized popup for <select multiple> elements 1785 https://bugs.webkit.org/show_bug.cgi?id=36368 1786 1787 Using QtMaemoWebPopup instead of QtFallbackWebPopup for Maemo. 1788 1789 * WebCoreSupport/ChromeClientQt.cpp: 1790 (WebCore::ChromeClientQt::createSelectPopup): 1791 * WebCoreSupport/QtFallbackWebPopup.cpp: 1792 (WebCore::QtFallbackWebPopup::show): 1793 (WebCore::QtFallbackWebPopup::populate): 1794 1795 2010-04-01 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 1796 1797 Reviewed by Kenneth Rohde Christiansen. 1798 1799 Add Single and Multiple Selection Popup for Maemo 5. 1800 1801 [Qt] Maemo5 theme - popup dialogs 1802 https://bugs.webkit.org/show_bug.cgi?id=36789 1803 1804 * WebCoreSupport/QtMaemoWebPopup.cpp: 1805 (WebCore::Maemo5Popup::populateList): 1806 (WebCore::Maemo5Popup::onItemSelected): 1807 (WebCore::QtMaemoWebPopup::createSingleSelectionPopup): 1808 (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup): 1809 (WebCore::Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup): 1810 (WebCore::MultipleItemListDelegate::MultipleItemListDelegate): 1811 (WebCore::MultipleItemListDelegate::paint): 1812 (WebCore::Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup): 1813 * WebCoreSupport/QtMaemoWebPopup.h: 1814 1815 2010-03-30 Luiz Agostini <luiz.agostini@openbossa.org> 1816 1817 Reviewed by Kenneth Rohde Christiansen. 1818 1819 [Qt] Maemo5 theme - QtMaemoWebPopup class 1820 https://bugs.webkit.org/show_bug.cgi?id=36790 1821 1822 A new QtAbstractWebPopup descendant class to be used for maemo menu lists. 1823 This is the first step. The next step will be the dialogs implementation that 1824 will come in bug 36789 and finally to use QtMaemoWebPopup instead of QtFallbackWebPopup 1825 that will come in bug 36368. 1826 1827 * WebCoreSupport/QtMaemoWebPopup.cpp: Added. 1828 (WebCore::QtMaemoWebPopup::QtMaemoWebPopup): 1829 (WebCore::QtMaemoWebPopup::~QtMaemoWebPopup): 1830 (WebCore::QtMaemoWebPopup::createSingleSelectionPopup): 1831 (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup): 1832 (WebCore::QtMaemoWebPopup::createPopup): 1833 (WebCore::QtMaemoWebPopup::show): 1834 (WebCore::QtMaemoWebPopup::hide): 1835 (WebCore::QtMaemoWebPopup::popupClosed): 1836 (WebCore::QtMaemoWebPopup::itemClicked): 1837 * WebCoreSupport/QtMaemoWebPopup.h: Added. 1838 (WebCore::Maemo5Popup::Maemo5Popup): 1839 1840 2010-03-31 Antti Koivisto <koivisto@iki.fi> 1841 1842 Reviewed by Kenneth Rohde Christiansen. 1843 1844 https://bugs.webkit.org/show_bug.cgi?id=36446 1845 [Qt] QWebSettings::TiledBackingStoreEnabled attribute lacks documentation and default value 1846 1847 * Api/qgraphicswebview.cpp: 1848 * Api/qwebsettings.cpp: 1849 (QWebSettings::QWebSettings): 1850 1851 2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> 1852 1853 Reviewed by Antti Koivisto. 1854 1855 Change due to renaming of frame flattening setting. 1856 1857 * Api/qwebpage.cpp: 1858 (qt_drt_setFrameFlatteningEnabled): 1859 * Api/qwebsettings.cpp: 1860 (QWebSettingsPrivate::apply): 1861 * symbian/eabi/QtWebKitu.def: 1862 1863 2010-03-29 Kenneth Rohde Christiansen <kenneth@webkit.org> 1864 1865 Reviewed by Antti Koivisto. 1866 1867 Use 'Mobile Safari' instead of 'Safari' on mobile Qt platforms. 1868 1869 * Api/qwebpage.cpp: 1870 (QWebPage::userAgentForUrl): 1871 1872 2010-03-22 Kenneth Rohde Christiansen <kenneth@webkit.org> 1873 1874 Reviewed by Simon Fraser. 1875 1876 Add support for Widgets 1.0: View Mode Media Feature 1877 https://bugs.webkit.org/show_bug.cgi?id=35446 1878 1879 Add an internal Qt API for changing the view mode media feature 1880 (http://www.w3.org/TR/widgets-vmmf/). 1881 1882 * Api/qwebpage.cpp: 1883 (qt_wrt_setViewMode): 1884 (QWebPagePrivate::priv): 1885 * Api/qwebpage_p.h: 1886 * WebCoreSupport/ChromeClientQt.cpp: 1887 (WebCore::ChromeClientQt::isDocked): 1888 (WebCore::ChromeClientQt::isFloating): 1889 (WebCore::ChromeClientQt::isApplication): 1890 (WebCore::ChromeClientQt::isFullscreen): 1891 * WebCoreSupport/ChromeClientQt.h: 1892 1893 2010-03-29 Dawit Alemayehu <adawit@kde.org> 1894 1895 Reviewed by Simon Hausmann. 1896 1897 [Qt] Added support for handling the HTTP "Content-Disposition" header. 1898 1899 https://bugs.webkit.org/show_bug.cgi?id=36395 1900 1901 Whenever a server response contains a "Content-Disposition: attachment..." header, 1902 treat the request as a download and emit the unsupportedContent signal. 1903 1904 * Api/qwebpage.cpp: 1905 * WebCoreSupport/FrameLoaderClientQt.cpp: 1906 (WebCore::FrameLoaderClientQt::download): 1907 (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): 1908 1909 2010-03-29 Simon Hausmann <simon.hausmann@nokia.com> 1910 1911 Reviewed by Tor Arne VestbÞ. 1912 1913 [Qt] unit tests don't compile inside of Qt 1914 1915 https://bugs.webkit.org/show_bug.cgi?id=36756 1916 1917 * tests/tests.pri: Don't do the target substitution inside Qt and find the sources 1918 through VPATH instead of relying on the location of the .pro file exclusively. 88 1919 89 1920 2010-03-25 Yael Aharon <yael.aharon@nokia.com> … … 102 1933 * Api/qgraphicswebview.h: 103 1934 1935 2010-03-26 Olivier Goffart <ogoffart@trolltech.com> 1936 1937 Reviewed by Simon Hausmann. 1938 1939 [Qt] Compile with QT_USE_FAST_OPERATOR_PLUS 1940 1941 * WebCoreSupport/InspectorClientQt.cpp: 1942 (WebCore::InspectorClientQt::populateSetting): 1943 (WebCore::InspectorClientQt::storeSetting): 1944 1945 2010-03-26 David Boddie <dboddie@trolltech.com> 1946 1947 Reviewed by Simon Hausmann. 1948 1949 [Qt] Doc: Simplified Commercial Editions for Qt 4.7. 1950 1951 * docs/qtwebkit.qdoc: 1952 1953 2010-03-25 Kenneth Rohde Christiansen <kenneth@webkit.org> 1954 1955 Reviewed by Eric Seidel. 1956 1957 Make QWebPage not depend on view() but use the client->ownerWidget() 1958 instead. Also, handle the case where there is not page client. 1959 1960 * Api/qwebpage.cpp: 1961 (QWebPagePrivate::createContextMenu): 1962 (QWebPagePrivate::keyPressEvent): 1963 (QWebPage::javaScriptAlert): 1964 (QWebPage::javaScriptConfirm): 1965 (QWebPage::javaScriptPrompt): 1966 (QWebPage::shouldInterruptJavaScript): 1967 (QWebPage::createWindow): 1968 (QWebPage::action): 1969 (QWebPage::extension): 1970 (QWebPage::chooseFile): 1971 (QWebPage::userAgentForUrl): 1972 1973 2010-03-23 Kenneth Rohde Christiansen <kenneth@webkit.org> 1974 1975 Reviewed by Simon Hausmann. 1976 1977 Calling setView(0) on a QWebPage being shown by a QGraphicsWebView, 1978 would uninstall the page client, deleting the QGraphicsWebViewPrivate 1979 instance. If called with an argument, it would do a wrong static_cast 1980 and crash. 1981 1982 * Api/qwebpage.cpp: 1983 (QWebPageWidgetClient::QWebPageWidgetClient): 1984 (QWebPageWidgetClient::isQWidgetClient): 1985 (QWebPageWidgetClient::screenNumber): 1986 (QWebPage::QWebPage): 1987 (QWebPage::setView): 1988 * Api/qgraphicswebview.cpp: 1989 (QGraphicsWebViewPrivate::unsetPageIfExists): 1990 (QGraphicsWebView::setPage): 1991 * Api/qwebpage.cpp: 1992 (QWebPageWidgetClient::isQWidgetClient): 1993 (QWebPageWidgetClient::screenNumber): 1994 (QWebPage::QWebPage): 1995 (QWebPage::setView): 1996 * Api/qwebpage.h: 1997 * Api/qwebview.cpp: 1998 (QWebViewPrivate::unsetPageIfExists): 1999 (QWebView::setPage): 2000 2001 2010-03-25 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 2002 2003 Reviewed by Simon Hausmann. 2004 2005 [Qt] Implement ChromeClient::windowResizerRect() 2006 2007 https://bugs.webkit.org/show_bug.cgi?id=21300 2008 2009 We assume the resize corner to be in the lower right corner of 2010 the window and having the width and height of the scrollbars. 2011 2012 The helper function geometryRelativeToOwnerWidget() in the page 2013 client is used to clip the resize rect to the actual size of the 2014 viewport, not the size of the QGraphicsView. 2015 2016 * Api/qgraphicswebview.cpp: 2017 * Api/qwebpage.cpp: 2018 * WebCoreSupport/ChromeClientQt.cpp: 2019 2020 2010-03-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2021 2022 Reviewed by Kenneth Rohde Christiansen. 2023 2024 Add the FrameFlatteningEnabled WebAttribute to QWebSettings. 2025 2026 [Qt] Missing QWebSettings for Frame Flattening 2027 https://bugs.webkit.org/show_bug.cgi?id=36553 2028 2029 * Api/qwebsettings.cpp: 2030 (QWebSettingsPrivate::apply): 2031 (QWebSettings::QWebSettings): 2032 * Api/qwebsettings.h: 2033 2034 2010-03-26 Simon Hausmann <simon.hausmann@nokia.com> 2035 2036 Symbian build fix. 2037 2038 [Qt] Updated the def file with new exports used by QtLauncher. 2039 2040 * symbian/eabi/QtWebKitu.def: 2041 2042 2010-03-24 Kent Tamura <tkent@chromium.org> 2043 2044 Reviewed by Darin Adler. 2045 2046 Make Icon::createIconForFiles() optional. 2047 https://bugs.webkit.org/show_bug.cgi?id=35072 2048 2049 - Rename iconForFiles() to chooseIconForFiles(). 2050 - Call Icon::createIconForFiles() from chooseIconForFiles(). 2051 2052 * WebCoreSupport/ChromeClientQt.cpp: 2053 (WebCore::ChromeClientQt::chooseIconForFiles): 2054 * WebCoreSupport/ChromeClientQt.h: 2055 2056 2010-03-23 Luiz Agostini <luiz.agostini@openbossa.org> 2057 2058 Reviewed by Kenneth Rohde Christiansen. 2059 2060 QGraphicsWebView crash when calling setView on the QWebPage... 2061 https://bugs.webkit.org/show_bug.cgi?id=36436 2062 2063 Checking for pageClient existance before showing popups. 2064 2065 * WebCoreSupport/QtFallbackWebPopup.cpp: 2066 (WebCore::QtFallbackWebPopup::show): 2067 2068 2010-03-23 Anders Bakken <anders.bakken@nokia.com>, Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2069 2070 Reviewed by Kenneth Rohde Christiansen. 2071 2072 Check if q->scene() is available before actually using it 2073 on QGraphicsWebViewPrivate. 2074 2075 QGraphicsWebView crash 2076 https://bugs.webkit.org/show_bug.cgi?id=32670 2077 2078 * Api/qgraphicswebview.cpp: 2079 (QGraphicsWebViewPrivate::screenNumber): 2080 (QGraphicsWebViewPrivate::ownerWidget): 2081 104 2082 2010-03-23 David Leong <david.leong@nokia.com> 105 2083 … … 109 2087 110 2088 * symbian/eabi/QtWebKitu.def: 2089 2090 2010-03-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2091 2092 Reviewed by Kenneth Rohde Christiansen. 2093 2094 [Qt] Remove support for Qt v4.4 2095 https://bugs.webkit.org/show_bug.cgi?id=36389 2096 2097 * Api/qwebelement.cpp: 2098 (QWebElement::classes): 2099 * Api/qwebpage.cpp: 2100 (QWebPagePrivate::editorActionForKeyEvent): 2101 (QWebPage::userAgentForUrl): 2102 * WebCoreSupport/EditorClientQt.cpp: 2103 (WebCore::EditorClientQt::handleKeyboardEvent): 2104 * tests/tests.pro: 2105 2106 2010-03-22 Kent Hansen <kent.hansen@nokia.com> 2107 2108 Reviewed by Laszlo Gombos. 2109 2110 [Qt] Fix qdoc warnings 2111 https://bugs.webkit.org/show_bug.cgi?id=36447 2112 2113 * Api/qgraphicswebview.cpp: Add missing (). 2114 * Api/qwebframe.cpp: Remove reference to non-existent parameter "url". 2115 * Api/qwebsettings.cpp: Document parameter "location". 2116 2117 2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org> 2118 2119 Reviewed by Simon Hausmann. 2120 2121 [Qt] Don't construct a QLineEdit every time when painting a text field 2122 https://bugs.webkit.org/show_bug.cgi?id=36373 2123 2124 Add a simple benchmark covering this area. 2125 2126 * tests/benchmarks/painting/tst_painting.cpp: 2127 (tst_Painting::textAreas): 2128 2129 2010-03-22 Yi Shen <shenyi2006@gmail.com> 2130 2131 Reviewed by Simon Hausmann. 2132 2133 https://bugs.webkit.org/show_bug.cgi?id=35933 2134 [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard 2135 Make sure the selection start index is smaller than the selection end index. 2136 2137 * Api/qwebpage.cpp: 2138 (QWebPagePrivate::inputMethodEvent): 2139 * tests/qwebpage/tst_qwebpage.cpp: 2140 (tst_QWebPage::inputMethods): 2141 2142 2010-03-21 Kristian Amlie <kristian.amlie@nokia.com> 2143 2144 Reviewed by Simon Hausmann. 2145 2146 Fixed updating the VKB display when inputting into QGraphicsWebView. 2147 https://bugs.webkit.org/show_bug.cgi?id=36292 2148 2149 * Api/qgraphicswebview.cpp: 2150 (QGraphicsWebViewPrivate::_q_updateMicroFocus): 2151 (QGraphicsWebView::setPage): 2152 * Api/qgraphicswebview.h: 2153 2154 2010-03-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2155 2156 Unreviewed. 2157 2158 Buildfix for Qt v4.5. 2159 2160 * Api/qgraphicswebview.cpp: 2161 (QGraphicsWebViewOverlay::q): 2162 2163 2010-03-18 Kenneth Rohde Christiansen <kenneth@webkit.org> 2164 2165 Reviewed by Darin Adler. 2166 2167 Make it possible for the Qt DRT to set the media type from 2168 the LayoutTestController. 2169 2170 * Api/qwebframe.cpp: 2171 (qt_drt_setMediaType): 111 2172 112 2173 2010-03-18 Joe Ligman <joseph.ligman@nokia.com> … … 128 2189 * tests/qwebframe/tst_qwebframe.cpp: 129 2190 130 20 09-12-18 Joe Ligman <joseph.ligman@nokia.com>2191 2010-03-18 Antti Koivisto <koivisto@iki.fi> 131 2192 132 2193 Reviewed by Kenneth Rohde Christiansen. 133 2194 134 [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow 135 then checking current frame and then ancestors 136 https://bugs.webkit.org/show_bug.cgi?id=32668 137 138 * Api/qwebframe.cpp: 139 (QWebFramePrivate::scrollOverflow): 140 (QWebFrame::scrollRecursively): 2195 https://bugs.webkit.org/show_bug.cgi?id=36102 2196 [Qt] Scaling control API for tiled backing store 2197 2198 The scale is set by passing the QGraphicsWebView scale to the backing store. The 2199 only new API is the tiledBackingStoreFrozen property which allows disabling 2200 all updates (for example during zoom animation). 2201 2202 * Api/qgraphicswebview.cpp: 2203 (QGraphicsWebViewPrivate::_q_scaleChanged): 2204 (QGraphicsWebViewPrivate::updateTiledBackingStoreScale): 2205 (QGraphicsWebView::QGraphicsWebView): 2206 (QGraphicsWebView::isTiledBackingStoreFrozen): 2207 (QGraphicsWebView::setTiledBackingStoreFrozen): 2208 * Api/qgraphicswebview.h: 2209 * Api/qwebframe.cpp: 2210 * Api/qwebframe_p.h: 2211 2212 2010-03-17 Antti Koivisto <koivisto@iki.fi> 2213 2214 Reviewed by Tor Arne VestbÞ. 2215 2216 Fix Qt build with tiled backing store disabled. 2217 2218 * Api/qwebframe.cpp: 2219 * Api/qwebframe_p.h: 2220 2221 2010-03-17 Chang Shu <chang.shu@nokia.com> 2222 2223 Reviewed by Laszlo Gombos. 2224 2225 https://bugs.webkit.org/show_bug.cgi?id=36139 2226 [Qt] Clean up cache while setting cache quota. This behavior matches other platforms, 2227 such as mac and gtk. 2228 2229 * Api/qwebsettings.cpp: 2230 (QWebSettings::setOfflineWebApplicationCacheQuota): 2231 2232 2010-03-17 Csaba Osztrogonác <ossy@webkit.org> 2233 2234 Reviewed by Kenneth Rohde Christiansen. 2235 2236 [Qt] Enable accelerated compositing by default 2237 https://bugs.webkit.org/show_bug.cgi?id=35866 2238 2239 * Api/qwebsettings.cpp: 2240 (QWebSettings::QWebSettings): 2241 2242 2010-03-15 Antti Koivisto <koivisto@iki.fi> 2243 2244 Reviewed by Simon Hausmann. 2245 2246 https://bugs.webkit.org/show_bug.cgi?id=36121 2247 [Qt] Make WebKit scrollbars work with tiling 2248 2249 - Use the scrollbar overlay (implemented for accelerated compositing) when in tiled mode. 2250 - Make overlay compile unconditionally, enable on demand. This removes bunch of unneeded ifdefs. 2251 - Update the scroll position to the backing store as needed. 2252 - Renamed some methods. 2253 2254 * Api/qgraphicswebview.cpp: 2255 (QGraphicsWebViewPrivate::): 2256 (QGraphicsWebViewPrivate::createOrDeleteOverlay): 2257 (QGraphicsWebViewPrivate::setRootGraphicsLayer): 2258 (QGraphicsWebViewPrivate::updateCompositingScrollPosition): 2259 (QGraphicsWebViewPrivate::scroll): 2260 (QGraphicsWebViewPrivate::update): 2261 (QGraphicsWebViewPrivate::graphicsItemVisibleRect): 2262 (QGraphicsWebView::paint): 2263 (QGraphicsWebView::setPage): 2264 (QGraphicsWebView::updateGeometry): 2265 (QGraphicsWebView::setGeometry): 2266 * Api/qwebframe.cpp: 2267 (QWebFramePrivate::renderFromTiledBackingStore): 2268 * Api/qwebframe_p.h: 2269 2270 2010-03-15 Robert Hogan <robert@webkit.org> 2271 2272 Reviewed by Simon Hausmann. 2273 2274 [Qt] Fix crash in QWebView::setPage() 2275 2276 tst_qwebpage was crashing on setPage(0) 2277 2278 https://bugs.webkit.org/show_bug.cgi?id=36137 2279 2280 * Api/qwebview.cpp: 2281 (QWebView::setPage): 2282 2283 2010-03-16 Yury Semikhatsky <yurys@chromium.org> 2284 2285 Reviewed by Pavel Feldman. 2286 2287 Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. 2288 2289 Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder 2290 https://bugs.webkit.org/show_bug.cgi?id=35036 2291 2292 * Api/qwebinspector.cpp: 2293 (QWebInspector::hideEvent): 2294 (QWebInspector::closeEvent): 2295 * Api/qwebinspector.h: 2296 * Api/qwebpage.h: 2297 * WebCoreSupport/InspectorClientQt.cpp: 2298 (WebCore::InspectorClientQt::openInspectorFrontend): 2299 (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt): 2300 (WebCore::InspectorFrontendClientQt::frontendLoaded): 2301 (WebCore::InspectorFrontendClientQt::localizedStringsURL): 2302 (WebCore::InspectorFrontendClientQt::hiddenPanels): 2303 (WebCore::InspectorFrontendClientQt::bringToFront): 2304 (WebCore::InspectorFrontendClientQt::closeWindow): 2305 (WebCore::InspectorFrontendClientQt::attachWindow): 2306 (WebCore::InspectorFrontendClientQt::detachWindow): 2307 (WebCore::InspectorFrontendClientQt::setAttachedWindowHeight): 2308 (WebCore::InspectorFrontendClientQt::inspectedURLChanged): 2309 (WebCore::InspectorFrontendClientQt::updateWindowTitle): 2310 * WebCoreSupport/InspectorClientQt.h: 2311 2312 2010-03-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2313 2314 Unreviewed. 2315 2316 [Qt] Build fix if TILED_BACKING_STORE is disabled. 2317 2318 * Api/qwebframe.cpp: 2319 (QWebFramePrivate::renderContentsLayerAbsoluteCoords): 2320 2321 2010-03-14 Chang Shu <chang.shu@nokia.com> 2322 2323 Reviewed by Simon Hausmann. 2324 2325 [Qt] [Symbian] Use Symbian native dialog providers for combo pupups. 2326 https://bugs.webkit.org/show_bug.cgi?id=35919 2327 2328 * WebCoreSupport/QtFallbackWebPopup.cpp: 2329 (WebCore::QtFallbackWebPopup::show): 2330 (WebCore::ResetAndDestroy): 2331 (WebCore::QtFallbackWebPopup::showS60BrowserDialog): 2332 * WebCoreSupport/QtFallbackWebPopup.h: 2333 2334 2010-03-14 Antti Koivisto <koivisto@iki.fi> 2335 2336 Reviewed by Simon Hausmann. 2337 2338 https://bugs.webkit.org/show_bug.cgi?id=35146 2339 Support tiled backing store 2340 2341 Implements a basic tiled backing store mechanism. Tiles are created and 2342 deleted on demand. The page content is cached to the tiles. Tile content 2343 is kept in sync with the document. Since the backing store covers area 2344 larger than the currently visible viewport, the document can be scrolled 2345 quickly without having to enter rendering tree painting. 2346 2347 The tile management code is platform independent. This patch has simple QPixmap 2348 based tile implementation for Qt. 2349 2350 The feature is behind ENABLE_TILED_BACKING_STORE flag. 2351 2352 * Api/qgraphicswebview.cpp: 2353 (QGraphicsWebViewPrivate::visibleRect): 2354 (QGraphicsWebView::paint): 2355 * Api/qwebframe.cpp: 2356 (QWebFramePrivate::renderContentsLayerAbsoluteCoords): 141 2357 * Api/qwebframe.h: 142 * Api/qwebframe_p.h: 143 * tests/qwebframe/qwebframe.qrc: 144 * tests/qwebframe/testiframe.html: Added. 145 * tests/qwebframe/testiframe2.html: Added. 146 * tests/qwebframe/tst_qwebframe.cpp: 147 148 2010-03-21 Kristian Amlie <kristian.amlie@nokia.com> 149 150 Reviewed by Simon Hausmann. 151 152 Fixed updating the VKB display when inputting into QGraphicsWebView. 153 https://bugs.webkit.org/show_bug.cgi?id=36292 154 155 * Api/qgraphicswebview.cpp: 156 (QGraphicsWebViewPrivate::_q_updateMicroFocus): 157 (QGraphicsWebView::setPage): 158 * Api/qgraphicswebview.h: 2358 * Api/qwebsettings.cpp: 2359 (QWebSettingsPrivate::apply): 2360 * Api/qwebsettings.h: 2361 2362 2010-03-13 Csaba Osztrogonác <ossy@webkit.org> 2363 2364 [Qt] Enable accelerated compositing by default 2365 https://bugs.webkit.org/show_bug.cgi?id=35866 2366 2367 Unreviewed. Roll-out r55955, because it broke 3 tests: 2368 - animations/fill-mode-transform.html 2369 - animations/play-state.html 2370 - animations/simultaneous-start-left.html 2371 2372 * Api/qwebsettings.cpp: 2373 (QWebSettings::QWebSettings): 2374 2375 2010-03-13 Simon Hausmann <simon.hausmann@nokia.com> 2376 2377 Reviewed by Kenneth Rohde Christiansen. 2378 2379 [Qt] Enable accelerated compositing by default 2380 https://bugs.webkit.org/show_bug.cgi?id=35866 2381 2382 * Api/qwebsettings.cpp: 2383 (QWebSettings::QWebSettings): 2384 2385 2010-03-11 Anders Carlsson <andersca@apple.com> 2386 2387 Reviewed by David Hyatt. 2388 2389 Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. 2390 2391 * WebCoreSupport/ChromeClientQt.cpp: 2392 * WebCoreSupport/ChromeClientQt.h: 2393 2394 2010-03-10 Robert Hogan <robert@webkit.org> 2395 2396 Reviewed by Simon Hausmann. 2397 2398 [Qt] Add Support for WebKitEnableCaretBrowsing to Qt DRT 2399 2400 Unskip test fast/events/multiline-link-arrow-navigation.html 2401 Fix typo (superfluous space) in QWebSettings docs. 2402 2403 https://bugs.webkit.org/show_bug.cgi?id=35593 2404 2405 * Api/qwebpage.cpp: 2406 (qt_drt_enableCaretBrowsing): 2407 * Api/qwebsettings.cpp: 2408 (QWebSettingsPrivate::apply): fix typo in docs 2409 2410 2010-03-02 Adam Treat <atreat@rim.com> 2411 2412 Reviewed by Dave Hyatt. 2413 2414 Adapt the qt port to the refactoring of repaint methods. 2415 2416 https://bugs.webkit.org/show_bug.cgi?id=34214 2417 2418 * WebCoreSupport/ChromeClientQt.cpp: 2419 (WebCore::ChromeClientQt::invalidateContents): 2420 (WebCore::ChromeClientQt::invalidateWindow): 2421 (WebCore::ChromeClientQt::invalidateContentsAndWindow): 2422 (WebCore::ChromeClientQt::invalidateContentsForSlowScroll): 2423 * WebCoreSupport/ChromeClientQt.h: 2424 2425 2010-03-08 Eric Uhrhane <ericu@chromium.org> 2426 2427 Reviewed by David Levin. 2428 2429 Remove the now-redundant Settings fields for the Database 2430 https://bugs.webkit.org/show_bug.cgi?id=35763 2431 2432 No new tests; this code isn't called. 2433 2434 * Api/qwebsettings.cpp: 2435 (QWebSettingsPrivate::apply): Remove the call into Settings. 2436 2437 2010-03-08 Simon Hausmann <simon.hausmann@nokia.com> 2438 2439 Reviewed by Laszlo Gombos. 2440 2441 [Qt] Binary incompatibility between Qt 4.6's WebKit and trunk in QWebSettings 2442 https://bugs.webkit.org/show_bug.cgi?id=35858 2443 2444 Moved the enum value added in r54873 to the end of the enum, to preserve 2445 binary compatibility. DnsPrefetchEnabled was in the last release and needs 2446 to remain after LocalContentCanAccessRemoteUrls. 2447 2448 * Api/qwebsettings.h: 2449 2450 2010-03-06 Mark Rowe <mrowe@apple.com> 2451 2452 Rubber-stamped by Sam Weinig. 2453 2454 Remove unnecessary includes of wtf/Platform.h. This is already pulled in by the prefix header. 2455 2456 * WebCoreSupport/EditCommandQt.cpp: 2457 2458 2010-03-02 Antonio Gomes <tonikitoo@webkit.org> 2459 2460 Reviewed by Simon Hausmann. 2461 Patch by Antonio Gomes <tonikitoo@webkit.org> 2462 2463 [Qt] QWebSettings attribute for toggle Spatial Navigation on/off 2464 https://bugs.webkit.org/show_bug.cgi?id=33714 (Qt API part) 2465 2466 Added 'SpatialNavigationEnabled' attribute to QWebSettings. 2467 2468 * Api/qwebsettings.cpp: 2469 (QWebSettingsPrivate::apply): 2470 * Api/qwebsettings.h: 159 2471 160 2472 2010-03-04 Simon Hausmann <simon.hausmann@nokia.com> … … 171 2483 * Api/qwebelement.h: 172 2484 173 2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org> 174 175 Reviewed by Simon Hausmann. 176 177 Do not set the combobox font on Maemo5 and S60; use the 178 default instead. 2485 2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2486 2487 Reviewed by Tor Arne VestbÞ. 2488 2489 [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic. 2490 2491 This also allows shadow builds relying only on qmake to work properly. 2492 2493 * tests/benchmarks/loading/loading.pro: 2494 * tests/benchmarks/painting/painting.pro: 2495 * tests/hybridPixmap/hybridPixmap.pro: 2496 * tests/qgraphicswebview/qgraphicswebview.pro: 2497 * tests/qwebelement/qwebelement.pro: 2498 * tests/qwebframe/qwebframe.pro: 2499 * tests/qwebhistory/qwebhistory.pro: 2500 * tests/qwebhistoryinterface/qwebhistoryinterface.pro: 2501 * tests/qwebinspector/qwebinspector.pro: 2502 * tests/qwebpage/qwebpage.pro: 2503 * tests/qwebplugindatabase/qwebplugindatabase.pro: 2504 2505 2010-03-02 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 2506 2507 Reviewed by Kenneth Rohde Christiansen. 2508 2509 [Qt] Fix generation of forwarding headers 2510 2511 The dependencies were a bit wrong, so we ended up not generating 2512 forwarding headers for qwebkitversion.h and qwebkitglobal.h 2513 2514 The forwarding headers are now the only targets depending on the 2515 real headers. All other targets either depend on the generated 2516 class headers, or the forwarding headers. 2517 2518 * Api/DerivedSources.pro: 2519 2520 2010-03-02 Eric Uhrhane <ericu@chromium.org> 2521 2522 Reviewed by David Levin. 2523 2524 Move database enable bit fully out of settings 2525 This is stage one of a three-stage commit [webkit, then chromium, then 2526 webkit again]. In this change I'm adding calls to 2527 Database::setIsAvailable inside Settings::setDatabaseEnabled and 2528 anywhere else that called it, and switching webkit fully over to using 2529 that flag [added in a previous checkin]. Phase two will remove 2530 Chromium's use of Settings for the Database, and phase three will remove 2531 the Setting for the Database enable entirely, leaving only 2532 Database::isAvailable/setIsAvailable. 2533 2534 No new tests; tested by existing storage tests. 2535 2536 https://bugs.webkit.org/show_bug.cgi?id=35310 2537 2538 * Api/qwebsettings.cpp: 2539 (QWebSettingsPrivate::apply): Add a call to Database::setIsAvailable 2540 2541 2010-03-02 Simon Hausmann <simon.hausmann@nokia.com> 2542 2543 Symbian build fix. 2544 2545 [Qt] Updated the def file with one new export, to fix 2546 QtLauncher linkage. 2547 2548 * symbian/eabi/QtWebKitu.def: 2549 2550 2010-03-01 Jakob Petsovits <jpetsovits@rim.com> 2551 2552 Reviewed by Adam Barth. 2553 2554 Adapt to the new ZoomMode enum. 2555 https://bugs.webkit.org/show_bug.cgi?id=35347 2556 2557 * Api/qwebframe.cpp: 2558 (QWebFrame::setTextSizeMultiplier): 2559 (QWebFrame::setZoomFactor): 2560 * Api/qwebsettings.cpp: 2561 (QWebSettingsPrivate::apply): 2562 2563 2010-02-26 Diego Gonzalez <diego.gonzalez@openbossa.org> 2564 2565 Reviewed by Simon Hausmann. 2566 2567 Fix documentation of QWebSettings::setUserStyleSheetUrl method 2568 2569 The base 64 data in the exemple shows a not valid code. 2570 2571 REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a data URL (Base64) 2572 https://bugs.webkit.org/show_bug.cgi?id=34802 2573 2574 * Api/qwebsettings.cpp: 2575 2576 2010-02-26 Jamey Hicks <jamey.hicks@nokia.com> 2577 2578 Reviewed by Laszlo Gombos. 2579 2580 [Qt] added QWebSettings::setInspectorUrl() and QWebSettings::inspectorUrl() 2581 2582 Enables the use of alternate Web Inspector frontends by changing 2583 the location of the frontend. 2584 2585 This is required so that the Web Inspector may be run from an 2586 external process or an external tool such as Eclipse or Aptana may 2587 be used instead of the in-process Web Inspector UI. 2588 2589 https://bugs.webkit.org/show_bug.cgi?id=35340 2590 2591 * Api/qwebsettings.cpp: 2592 (QWebSettings::QWebSettings): 2593 (QWebSettings::setInspectorUrl): 2594 (QWebSettings::inspectorUrl): 2595 * Api/qwebsettings.h: 2596 * WebCoreSupport/InspectorClientQt.cpp: 2597 (WebCore::InspectorClientQt::createPage): 2598 2599 2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com> 2600 2601 Reviewed by Kenneth Rohde Christiansen. 2602 2603 Qt WebGL support 2604 2605 Adds enabling and disabling of WebGL support to QWebSettings. 2606 https://bugs.webkit.org/show_bug.cgi?id=35153 2607 2608 * Api/qwebsettings.cpp: 2609 (QWebSettingsPrivate::apply): 2610 (QWebSettings::QWebSettings): 2611 * Api/qwebsettings.h: 2612 2613 2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2614 2615 Reviewed by Kenneth Rohde Christiansen. 2616 2617 [Qt] Remove QGVLauncher 2618 2619 https://bugs.webkit.org/show_bug.cgi?id=35292 2620 2621 * QGVLauncher/QGVLauncher.pro: Removed. 2622 * QGVLauncher/main.cpp: Removed. 2623 2624 2010-02-23 Steve Block <steveblock@google.com> 2625 2626 Reviewed by Darin Adler. 2627 2628 Adds ChromeClient::cancelGeolocationPermissionRequestForFrame 2629 https://bugs.webkit.org/show_bug.cgi?id=34962 2630 2631 This method is required so that a Geolocation object can cancel an 2632 asynchronous permission request. This allows the chrome client to cancel 2633 any UI it is showing for the permission request. 2634 2635 * WebCoreSupport/ChromeClientQt.h: 2636 (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame): 2637 2638 2010-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2639 2640 Unreviewed Symbian build fix. 2641 2642 [Qt] Updated the def file with new exports to enable 2643 building DumpRenderTree. 2644 2645 * symbian/eabi/QtWebKitu.def: 2646 2647 2010-02-18 Noam Rosenthal <noam.rosenthal@nokia.com> 2648 2649 Reviewed by Kenneth Rohde Christiansen. 2650 2651 [Qt] Minor improvement to hybrid QPixmap 2652 https://bugs.webkit.org/show_bug.cgi?id=34507 2653 2654 * tests/hybridPixmap/test.html: use assignToHTMLImageElement on an 2655 existing element instead of toHTMLImageElement which creates a new one 2656 2657 2010-02-17 Dmitry Titov <dimich@chromium.org> 2658 2659 Reviewed by David Levin, Darin Fisher, Simon Hausmann. 2660 2661 When a live iframe element is moved between pages, it still depends on the old page. 2662 https://bugs.webkit.org/show_bug.cgi?id=34382 2663 2664 * Api/qwebframe_p.h: 2665 (QWebFramePrivate::setPage): Added. 2666 * WebCoreSupport/FrameLoaderClientQt.cpp: 2667 (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument): 2668 The QWebFrame caches a QWebPage which should be replaced when Frame is re-parented. 2669 Also, the QWebFrame is a child (in QT terms) of QWebPage - so update that relationship as well. 2670 Emit a signal that QWebFrame moved to a different QWebPage. 2671 2672 * WebCoreSupport/FrameLoaderClientQt.h: 2673 2674 2010-02-17 Kent Tamura <tkent@chromium.org> 2675 2676 Reviewed by Eric Seidel. 2677 2678 Introduces new Icon loading interface in order to support 2679 asynchronous loading. 2680 https://bugs.webkit.org/show_bug.cgi?id=32054 2681 2682 Add an empty implementation of ChromeClient::iconForFiles(). 2683 2684 * WebCoreSupport/ChromeClientQt.cpp: 2685 (WebCore::ChromeClientQt::iconForFiles): 2686 * WebCoreSupport/ChromeClientQt.h: 2687 2688 2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org> 2689 2690 Reviewed by Ariya Hidayat. 2691 2692 Make possible Qt DRT to get total number of pages to be printed 2693 2694 LayoutTests: 2695 printing/numberOfPages.html 2696 2697 [Qt] DRT: Get total number of pages to be printed 2698 https://bugs.webkit.org/show_bug.cgi?id=34955 2699 2700 * Api/qwebframe.cpp: 2701 (qt_drt_numberOfPages): 2702 (qt_drt_evaluateScriptInIsolatedWorld): 2703 2704 2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com> 2705 2706 Reviewed by Simon Hausmann. 2707 2708 [Qt] Allow scrolling to an anchor programmatically. 2709 https://bugs.webkit.org/show_bug.cgi?id=29856 2710 2711 * Api/qwebframe.cpp: 2712 (QWebFrame::scrollToAnchor): New API function. 2713 * Api/qwebframe.h: 2714 * tests/qwebframe/tst_qwebframe.cpp: New tests for scrollToAnchor(). 2715 2716 2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com> 2717 2718 Reviewed by Laszlo Gombos. 2719 2720 Fix building with Qt < 4.6. 2721 https://bugs.webkit.org/show_bug.cgi?id=34885 2722 2723 * Api/qgraphicswebview.cpp: 2724 (QGraphicsWebViewPrivate::updateResizesToContentsForPage): 2725 2726 2010-02-16 Simon Hausmann <simon.hausmann@nokia.com> 2727 2728 Unreviewed Symbian build fix. 2729 2730 Updated the def file with two new exports used by QtLauncher. 2731 2732 * symbian/eabi/QtWebKitu.def: 2733 2734 2010-02-16 Ismail Donmez <ismail@namtrac.org> 2735 2736 Reviewed by Pavel Feldman. 2737 2738 Fix compilation with inspector disabled. 2739 https://bugs.webkit.org/show_bug.cgi?id=32724 2740 2741 * Api/qwebpage.cpp: 2742 (qt_drt_webinspector_executeScript): 2743 (qt_drt_webinspector_close): 2744 (qt_drt_webinspector_show): 2745 (qt_drt_setTimelineProfilingEnabled): 2746 2747 2010-02-16 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2748 2749 Reviewed by Simon Hausman. 2750 2751 [Qt] Fix include paths for forwarding headers in standalone builds. 2752 2753 * Api/DerivedSources.pro: Use relative paths for package builds and added some 2754 documentation. 2755 2756 2010-02-15 Noam Rosenthal <noam.rosenthal@nokia.com> 2757 2758 Reviewed by Simon Hausmann. 2759 2760 [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property 2761 Add Q_DECLARE_METATYPE to QWebElement, add relevant tests to 2762 tst_qwebframe 2763 https://bugs.webkit.org/show_bug.cgi?id=34901 2764 2765 * Api/qwebelement.h: declare metatype 2766 * tests/qwebframe/tst_qwebframe.cpp: 2767 (MyQObject::webElementProperty): new test for QWebElement 2768 (MyQObject::setWebElementProperty): new test for QWebElement 2769 (MyQObject::myOverloadedSlot): new test for QWebElement 2770 2771 2010-02-15 Robert Hogan <robert@roberthogan.net>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2772 2773 Reviewed by Simon Hausmann. 2774 2775 [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled(). 2776 2777 Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT. 2778 2779 https://bugs.webkit.org/show_bug.cgi?id=33096 2780 2781 This allows the following tests to pass: 2782 2783 inspector/console-format-collections.html 2784 inspector/styles-iframe.html 2785 inspector/syntax-highlight-css.html 2786 inspector/syntax-highlight-javascript.html 2787 inspector/timeline-enum-stability.html 2788 inspector/timeline-layout.html 2789 inspector/timeline-mark-timeline.html 2790 inspector/timeline-paint.html 2791 inspector/timeline-parse-html.html 2792 inspector/timeline-recalculate-styles.html 2793 inspector/timeline-script-tag-1.html 2794 inspector/timeline-script-tag-2.html 2795 inspector/timeline-trivial.html 2796 inspector/cookie-resource-match.html 2797 inspector/elements-img-tooltip.html 2798 inspector/elements-panel-selection-on-refresh.html 2799 inspector/inspected-objects-not-overriden.html 2800 inspector/timeline-event-dispatch.html 2801 inspector/timeline-network-resource.html 2802 inspector/elements-panel-rewrite-href.html 2803 inspector/console-dir.html 2804 inspector/console-dirxml.html 2805 inspector/console-format.html 2806 inspector/console-tests.html 2807 inspector/elements-panel-structure.html 2808 inspector/evaluate-in-frontend.html 2809 inspector/console-clear.html 2810 2811 * Api/qwebpage.cpp: 2812 (qt_drt_webinspector_executeScript): 2813 (qt_drt_webinspector_close): 2814 (qt_drt_webinspector_show): 2815 (qt_drt_setTimelineProfilingEnabled): 2816 2817 * WebCoreSupport/InspectorClientQt.cpp: 2818 (InspectorClientQt::createPage) 2819 2820 2010-02-12 Antti Koivisto <koivisto@iki.fi> 2821 2822 Reviewed by Kenneth Rohde Christiansen and Simon Hausmann. 2823 2824 https://bugs.webkit.org/show_bug.cgi?id=34885 2825 Add a QGraphicsWebView mode that makes it automatically resize itself to the size of the content. 2826 2827 This is useful for cases where the client wants to implement page panning and zooming by manipulating 2828 the graphics item. 2829 2830 Add a option to QGVLauncher to test this mode. 2831 2832 * Api/qgraphicswebview.cpp: 2833 (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): 2834 (QGraphicsWebViewPrivate::updateResizesToContentsForPage): 2835 (QGraphicsWebViewPrivate::_q_contentsSizeChanged): 2836 (QGraphicsWebView::setPage): 2837 (QGraphicsWebView::setResizesToContents): 2838 (QGraphicsWebView::resizesToContents): 2839 * Api/qgraphicswebview.h: 2840 * QGVLauncher/main.cpp: 2841 (WebView::WebView): 2842 (MainView::MainView): 2843 (MainView::setMainWidget): 2844 (MainView::resizeEvent): 2845 (main): 2846 2847 2010-02-12 Diego Gonzalez <diego.gonzalez@openbossa.org> 2848 2849 Reviewed by Kenneth Rohde Christiansen. 2850 2851 Qt DRT now dump the frame loader callbacks when LayoutTestController() 2852 method is called. 2853 2854 LayoutTests: 2855 http/tests/security/mixedContent/data-url-script-in-iframe.html 2856 http/tests/security/mixedContent/empty-url-plugin-in-frame.html 2857 http/tests/security/mixedContent/insecure-css-in-iframe.html 2858 http/tests/security/mixedContent/insecure-iframe-in-iframe.html 2859 http/tests/security/mixedContent/insecure-image-in-iframe.html 2860 http/tests/security/mixedContent/insecure-plugin-in-iframe.html 2861 http/tests/security/mixedContent/insecure-script-in-iframe.html 2862 http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html 2863 http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html 2864 2865 [Qt] Make possible Qt DRT dump frame load callbacks 2866 https://bugs.webkit.org/show_bug.cgi?id=34702 2867 2868 * WebCoreSupport/FrameLoaderClientQt.cpp: 2869 (WebCore::FrameLoaderClientQt::didDisplayInsecureContent): 2870 (WebCore::FrameLoaderClientQt::didRunInsecureContent): 2871 2872 2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2873 2874 Reviewed by Tor Arne VestbÞ. 2875 2876 [Qt] Make qtlauncher and qgvlauncher use the generated headers 2877 path to make sure they are correctly generated. 2878 2879 * tests/tests.pri: 2880 2881 2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2882 2883 Reviewed by Tor Arne VestbÞ. 2884 2885 [Qt] Ensure relative paths in generated .pri files to ensure that 2886 a source package with pre-generated derived sources can be compiled. 2887 2888 - Re-add a separate headers.pri file for WEBKIT_API_HEADERS 2889 - Rename the generated headers.pri to classheaders.pri to avoid 2890 confusion with the one generated by synqt since they don't have the 2891 same content. 2892 - Remove private headers list variable from classheaders.pri 2893 - Use $$PWD in classheaders.pri 2894 - Remove classheaders.pri from the installed files 2895 2896 * Api/DerivedSources.pro: 2897 2898 2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2899 2900 Reviewed by Tor Arne VestbÞ. 2901 2902 [Qt] Minor fixes on QtWebKit headers generation. 2903 2904 - Adds QtWebKit to the generated headers destination path 2905 - Improve compatibility with MinGW 2906 2907 * Api/DerivedSources.pro: 2908 2909 2010-02-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2910 2911 Reviewed by nobody, build fix. 2912 2913 [Qt] Fix standalone build with MinGW. 2914 2915 * tests/qwebelement/tst_qwebelement.cpp: 2916 * tests/tests.pri: 2917 2918 2010-02-10 Diego Gonzalez <diego.gonzalez@openbossa.org> 2919 2920 Reviewed by Kenneth Rohde Christiansen. 2921 2922 Implement pageNumberForElementById() method in Qt DRT LayoutTestController, 2923 to make Qt DRT able to get page number. 2924 2925 LayoutTests: 2926 printing/page-break-always.html 2927 printing/pageNumerForElementById.html 2928 printing/css2.1/page-break-before-000.html 2929 printing/css2.1/page-break-after-000.html 2930 printing/css2.1/page-break-after-004.html 2931 printing/css2.1/page-break-before-001.html 2932 printing/css2.1/page-break-after-001.html 2933 printing/css2.1/page-break-after-002.html 2934 printing/css2.1/page-break-before-002.html 2935 printing/css2.1/page-break-inside-000.html 2936 2937 [Qt] Make possible Qt DRT get a page number for element by ID 2938 https://bugs.webkit.org/show_bug.cgi?id=34777 2939 2940 * Api/qwebframe.cpp: 2941 (qt_drt_pageNumberForElementById): 2942 2943 2010-02-09 Yael Aharon <yael.aharon@nokia.com> 2944 2945 Reviewed by Adam Barth. 2946 2947 [Qt] Unit test for window.runModalDialog 2948 https://bugs.webkit.org/show_bug.cgi?id=34755 2949 2950 * tests/qwebpage/tst_qwebpage.cpp: 2951 (TestModalPage::TestModalPage): 2952 (TestModalPage::createWindow): 2953 (tst_QWebPage::showModalDialog): 2954 2955 2010-02-09 Andreas Kling <andreas.kling@nokia.com> 2956 2957 Reviewed by Kenneth Rohde Christiansen. 2958 2959 [Qt] Sync with API changes in Maemo 5 kinetic scrolling 2960 2961 https://bugs.webkit.org/show_bug.cgi?id=34747 2962 2963 This is a forward-port of http://qt.gitorious.org/+qt-developers/qt/x11-maemo/commit/08497561 2964 2965 * Api/qwebview.cpp: 2966 (qt_sendSpontaneousEvent): 2967 (QWebViewKineticScroller::QWebViewKineticScroller): 2968 (QWebViewKineticScroller::setWidget): 2969 (QWebViewKineticScroller::eventFilter): 2970 (QWebViewKineticScroller::cancelLeftMouseButtonPress): 2971 (QWebViewKineticScroller::currentFrame): 2972 (QWebViewKineticScroller::scrollingFrameAt): 2973 (QWebViewKineticScroller::maximumScrollPosition): 2974 (QWebViewKineticScroller::scrollPosition): 2975 (QWebViewKineticScroller::viewportSize): 2976 (QWebViewKineticScroller::setScrollPosition): 2977 (QWebViewKineticScroller::sendEvent): 2978 (QWebView::QWebView): 2979 2980 2010-02-09 Yael Aharon <yael.aharon@nokia.com> 2981 2982 Reviewed by Kenneth Rohde Christiansen. 2983 2984 [Qt] Webkit in Qt does not have window.showModalDialog 2985 https://bugs.webkit.org/show_bug.cgi?id=25585 2986 2987 Create a new eventloop when runModal() is called. 2988 Added comemnt in QWebPage::createWindow that the application is responsible 2989 for setting the modality of the appropriate window. 2990 2991 * Api/qwebpage.cpp: 2992 * WebCoreSupport/ChromeClientQt.cpp: 2993 (WebCore::ChromeClientQt::ChromeClientQt): 2994 (WebCore::ChromeClientQt::~ChromeClientQt): 2995 (WebCore::ChromeClientQt::canRunModal): 2996 (WebCore::ChromeClientQt::runModal): 2997 * WebCoreSupport/ChromeClientQt.h: 2998 2999 2010-01-19 Kenneth Rohde Christiansen <kenneth@webkit.org> 3000 3001 Reviewed by Dave Hyatt. 3002 3003 Implement flattening of framesets 3004 https://bugs.webkit.org/show_bug.cgi?id=32717 3005 3006 Privately export the setFrameSetFlatteningEnabled setting for 3007 use with the Qt DRT. 3008 3009 * Api/qwebpage.cpp: 3010 (qt_drt_setFrameSetFlatteningEnabled): 3011 (QWebPagePrivate::core): 3012 * Api/qwebpage_p.h: 3013 3014 2010-02-05 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 3015 3016 [Qt] Fix build on Windows 3017 3018 Reviewed by Kenneth Rohde Christiansen. 3019 3020 DerivedSources for our API headers failed on Windows, 3021 due to Windows not accepting ; as a command separator, 3022 not needing quotes for echo, and needing < and > escaped. 3023 3024 We now detect Windows and set these quote markers and 3025 escape markers accordingly, as well as use && for separating 3026 individual commands. 3027 3028 * Api/DerivedSources.pro: 3029 3030 2010-02-05 Yury Semikhatsky <yurys@chromium.org> 3031 3032 Reviewed by Pavel Feldman. 3033 3034 Remove unused inmport of ScriptFunctionCall.h 3035 3036 https://bugs.webkit.org/show_bug.cgi?id=33592 3037 3038 * Api/qwebelement.cpp: 3039 3040 2010-02-05 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 3041 3042 Reviewed by Simon Hausmann. 3043 3044 [Qt] Generate convenience headers (QWebView, etc) using qmake 3045 3046 In Qt this is done using syncqt, but we use a pro-file instead 3047 that generates makefile-rules for each of the extra headers. 3048 3049 These extra headers are installed alongside the normal headers. 3050 3051 * Api/DerivedSources.pro: Added. List of headers + pro file magic 3052 * Api/headers.pri: Removed, list of headers is now in the above file 3053 3054 2010-02-04 No'am Rosenthal <noam.rosenthal@nokia.com> 3055 3056 Reviewed by Ariya Hidayat. 3057 3058 [Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage 3059 of QTimer::singleShot, and moved syncLayers() from paint() to update() 3060 https://bugs.webkit.org/show_bug.cgi?id=34062 3061 3062 * Api/qgraphicswebview.cpp: 3063 (QGraphicsWebViewPrivate::update): Moved the sync operation to update 3064 (QGraphicsWebView::paint): Moved the sync operation to update 3065 3066 2010-02-03 Andras Becsi <abecsi@webkit.org> 3067 3068 Unreviewed build fix. 3069 3070 [Qt] Roll-out r54281 because it broke the build on the Qt Release bot. 3071 3072 * Api/qgraphicswebview.cpp: 3073 (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): 3074 (QGraphicsWebViewPrivate::markForSync): 3075 (QGraphicsWebViewPrivate::update): 3076 (QGraphicsWebView::paint): 3077 3078 2010-02-02 Kenneth Rohde Christiansen <kenneth@webkit.org> 3079 3080 Reviewed by Ariya Hidayat. 3081 3082 Do not use a proxy widget for the QComboBox on Maemo 5, as it 3083 is not working properly and it is not needed at all, as the 3084 comboboxes comes up in their full width on the screen and 3085 do not depend on view. 179 3086 180 3087 * WebCoreSupport/QtFallbackWebPopup.cpp: 181 (WebCore::QtFallbackWebPopup::populate): 3088 (WebCore::QtFallbackWebPopup::show): 3089 3090 2010-02-02 Jessie Berlin <jberlin@webkit.org> 3091 3092 Rubber Stamped by Holger Freyther. 3093 3094 [Qt] Fix style issue identified in bug: 3095 https://bugs.webkit.org/show_bug.cgi?id=34329 3096 3097 * WebCoreSupport/InspectorClientQt.cpp: 3098 (WebCore::InspectorClientWebPage::InspectorClientWebPage): 3099 Fix indentation. 3100 3101 2010-02-01 Jessie Berlin <jberlin@webkit.org> 3102 3103 Reviewed by Holger Freyther. 3104 3105 [Qt] Enable inspecting the Web Inspector in QtLauncher 3106 3107 https://bugs.webkit.org/show_bug.cgi?id=34329 3108 3109 * WebCoreSupport/InspectorClientQt.cpp: 3110 (WebCore::InspectorClientWebPage::InspectorClientWebPage): 3111 Allow the DeveloperExtrasEnabled setting to default to true for the page containing the Web Inspector. 3112 3113 2010-02-02 Andreas Kling <andreas.kling@nokia.com> 3114 3115 Reviewed by Kenneth Rohde Christiansen. 3116 3117 [Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes 3118 3119 https://bugs.webkit.org/show_bug.cgi?id=34429 3120 3121 * Api/qwebpage.cpp: 3122 (QWebPage::javaScriptAlert): 3123 (QWebPage::javaScriptConfirm): 3124 (QWebPage::javaScriptPrompt): 3125 3126 2010-02-02 Noam Rosenthal <noam.rosenthal@nokia.com> 3127 3128 Reviewed by Kenneth Rohde Christiansen. 3129 3130 [Qt] Enable a way to measure FPS in QGVLauncher 3131 run QGVLauncher with --show-fps to see ongoing fps measurements 3132 This is not meant as accurate FPS, but rather as a way to find 3133 improvements/regressions 3134 https://bugs.webkit.org/show_bug.cgi?id=34450 3135 3136 * QGVLauncher/main.cpp: 3137 (MainView::MainView): initialize FPS values 3138 (MainView::paintEvent): count a painted frame here 3139 (MainView::printFps): we print the fps with qDebug every 5 seconds. 3140 3141 2010-01-29 Ben Murdoch <benm@google.com> 3142 3143 Reviewed by Dimitri Glazkov. 3144 3145 [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage. 3146 https://bugs.webkit.org/show_bug.cgi?id=34215 3147 3148 Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events. 3149 3150 * WebCoreSupport/ChromeClientQt.h: 3151 (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation. 3152 3153 2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org> 3154 3155 Reviewed by Simon Hausmann 3156 3157 Disable auto-uppercase and predictive text on Maemo5, just like the 3158 build-in MicroB Browser. 3159 3160 * WebCoreSupport/EditorClientQt.cpp: 3161 (WebCore::EditorClientQt::setInputMethodState): 182 3162 183 3163 2010-01-28 Andreas Kling <andreas.kling@nokia.com> … … 205 3185 (QWebView::QWebView): 206 3186 207 2010-01-2 9Kenneth Rohde Christiansen <kenneth@webkit.org>208 209 Reviewed by Simon Hausmann 210 211 D isable auto-uppercase and predictive text on Maemo5, just like the212 build-in MicroB Browser.213 214 * WebCoreSupport/ EditorClientQt.cpp:215 (WebCore:: EditorClientQt::setInputMethodState):3187 2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org> 3188 3189 Reviewed by Simon Hausmann. 3190 3191 Do not set the combobox font on Maemo5 and S60; use the 3192 default instead. 3193 3194 * WebCoreSupport/QtFallbackWebPopup.cpp: 3195 (WebCore::QtFallbackWebPopup::populate): 216 3196 217 3197 2010-01-28 Trond KjernÃ¥sen <trond@trolltech.com> … … 223 3203 * Api/qwebframe.cpp: 224 3204 (QWebFrame::print): 3205 3206 2010-01-27 Diego Gonzalez <diego.gonzalez@openbossa.org> 3207 3208 Reviewed by Kenneth Rohde Christiansen. 3209 3210 [Qt] DRT Provide worker thread ability to track counters 3211 https://bugs.webkit.org/show_bug.cgi?id=34221 3212 3213 Implement workerThreadCount() in LayoutTestController of Qt DRT 3214 3215 Tests: 3216 fast/workers/dedicated-worker-lifecycle.html 3217 fast/workers/shared-worker-frame-lifecycle.html 3218 fast/workers/shared-worker-lifecycle.html 3219 fast/workers/worker-lifecycle.html 3220 3221 * Api/qwebpage.cpp: 3222 (qt_drt_workerThreadCount): 3223 3224 2010-01-27 Simon Hausmann <simon.hausmann@nokia.com> 3225 3226 Reviewed by Laszlo Gombos. 3227 3228 [Qt] Update the .def files with exported symbols 3229 3230 * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi. 3231 3232 2010-01-27 Kent Hansen <kent.hansen@nokia.com> 3233 3234 Reviewed by Simon Hausmann. 3235 3236 [Qt] Meta-methods can't be introspected using ES5 API 3237 https://bugs.webkit.org/show_bug.cgi?id=34087 3238 3239 Test that Object.getOwnPropertyDescriptor and 3240 Object.getOwnPropertyNames work with meta-methods. 3241 3242 * tests/qwebframe/tst_qwebframe.cpp: 225 3243 226 3244 2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> … … 237 3255 * WebCoreSupport/QtFallbackWebPopup.cpp: 238 3256 (WebCore::QtFallbackWebPopup::show): 3257 3258 2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> 3259 3260 Reviewed by Simon Hausmann. 3261 3262 First steps of the QtScript API. 3263 3264 Two new classes were created; QScriptEngine and QScriptValue. 3265 The first should encapsulate a javascript context and the second a script 3266 value. 3267 3268 This API is still in development, so it isn't compiled by default. 3269 To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to 3270 build-webkit. 3271 3272 https://bugs.webkit.org/show_bug.cgi?id=32565 3273 3274 * docs/qtwebkit.qdocconf: 239 3275 240 3276 2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org> … … 266 3302 (tst_QWebPage::testJSPrompt): 267 3303 3304 2010-01-25 Simon Hausmann <hausmann@webkit.org> 3305 3306 Reviewed by Kenneth Rohde Christiansen. 3307 3308 [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view 3309 https://bugs.webkit.org/show_bug.cgi?id=34053 3310 3311 * Api/qgraphicswebview.cpp: 3312 (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics 3313 widget's style. 3314 * Api/qwebpage.cpp: 3315 (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style. 3316 268 3317 2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com> 269 3318 … … 275 3324 * symbian/backup_registration.xml: Added. 276 3325 277 20 09-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>3326 2010-01-23 Girish Ramakrishnan <girish@forwardbias.in> 278 3327 279 3328 Reviewed by Kenneth Rohde Christiansen. 280 3329 281 [Qt] Fix QWebInspector destruction problem. 282 https://bugs.webkit.org/show_bug.cgi?id=31664 283 284 * Api/qwebpage.cpp: 285 (QWebPage::~QWebPage): 3330 [Qt] Fix positioning of ComboBox popup in QGraphicsWebView. 3331 3332 Wrap the popup in a QGraphicsProxyWidget, so that the popup 3333 transforms with the item. 3334 3335 https://bugs.webkit.org/show_bug.cgi?id=33887 3336 3337 * WebCoreSupport/QtFallbackWebPopup.cpp: 3338 (WebCore::QtFallbackWebPopupCombo::hidePopup): 3339 (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): 3340 (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): 3341 (WebCore::QtFallbackWebPopup::show): 3342 * WebCoreSupport/QtFallbackWebPopup.h: 3343 3344 2010-01-22 Peter Kasting <pkasting@google.com> 3345 3346 Not reviewed, backout. 3347 3348 Back out r52673, which caused several regressions. 3349 https://bugs.webkit.org/show_bug.cgi?id=32533 3350 3351 * WebCoreSupport/QtFallbackWebPopup.cpp: 3352 (WebCore::QtFallbackWebPopupCombo::hidePopup): 3353 3354 2010-01-22 Girish Ramakrishnan <girish@forwardbias.in> 3355 3356 Reviewed by Simon Hausmann. 3357 3358 [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup 3359 3360 The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will 3361 need it to create a QGraphicsProxyWidget (in a future commit) for the 3362 QGraphicsWebView's web popup. 3363 3364 * WebCoreSupport/QtFallbackWebPopup.cpp: 3365 (WebCore::QtFallbackWebPopup::show): 3366 3367 2010-01-22 Girish Ramakrishnan <girish@forwardbias.in> 3368 3369 Reviewed by Kenneth Rohde Christiansen. 3370 3371 QState::polished() was renamed to QState::propertiesAssigned() when 3372 Qt 4.6.0 was released. 3373 3374 * QGVLauncher/main.cpp: 3375 (MainWindow::init): 3376 3377 2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org> 3378 3379 Reviewed by Kenneth Rohde Christiansen. 3380 3381 [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT 3382 https://bugs.webkit.org/show_bug.cgi?id=33945 3383 3384 * Api/qwebsecurityorigin.cpp: 3385 (qt_drt_setDomainRelaxationForbiddenForURLScheme): 3386 3387 2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com> 3388 3389 Reviewed by Antti Koivisto. 3390 3391 [Qt] Implement GraphicsLayer for accelerated layer compositing 3392 https://bugs.webkit.org/show_bug.cgi?id=33514 3393 3394 Here we have the QGraphicsWebView support for accelerated compositing 3395 3396 * Api/qgraphicswebview.cpp: 3397 (QGraphicsWebViewOverlay::q): access to container object 3398 (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the 3399 webview 3400 (QGraphicsWebViewOverlay::paint): paint everything but the contents 3401 (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed 3402 for accelerated compositing 3403 (QGraphicsWebViewPrivate::): 3404 (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): 3405 (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a 3406 scrollbar overlay, and that the new graphics layer is parented by the 3407 web-view 3408 (QGraphicsWebViewPrivate::markForSync): flush changes at earliest 3409 convenience or during the next draw 3410 3411 (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the 3412 position of the compositing layer with the scroll position 3413 (QGraphicsWebViewPrivate::syncLayers): flush changes now 3414 (QGraphicsWebViewPrivate::scroll): make sure we also move the 3415 compositing layer 3416 (QGraphicsWebViewPrivate::update): also update the overlay if needed 3417 (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0 3418 (QGraphicsWebView::paint): paint only contents if we have an overlay, 3419 sync the compositing layers now if needed 3420 (QGraphicsWebView::setPage): also clean up the compositing 3421 (QGraphicsWebView::updateGeometry): also update overlay geo 3422 (QGraphicsWebView::setGeometry): also update overlay geo 3423 * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient 3424 * Api/qwebsettings.cpp: init new settings flag for compositing as 3425 false 3426 (QWebSettingsPrivate::apply): apply new settings flag for compositing 3427 (QWebSettings::QWebSettings): 3428 * Api/qwebsettings.h: new settings flag for compositing 3429 * Api/qwebview.cpp: 3430 (QWebView::setPage): qwebview doesn't support compositing: always false 3431 * QGVLauncher/main.cpp: 3432 (WebView::WebView): some more cmdline arguments + compositing 3433 (MainWindow::init): some more cmdline arguments 3434 (main): ditto 3435 * WebCoreSupport/ChromeClientQt.cpp: 3436 (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for 3437 accel-compositing 3438 (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization): 3439 reimp for accel compositing 3440 (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for 3441 accel compositing 3442 * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing 3443 3444 2010-01-21 Benjamin Poulain <benjamin.poulain@nokia.com> 3445 3446 Reviewed by Simon Hausmann. 3447 3448 [Qt] Improve the autotests of QtWebkit 3449 https://bugs.webkit.org/show_bug.cgi?id=32216 3450 3451 Remove qWait() of the test when possible. 3452 3453 * tests/qwebpage/tst_qwebpage.cpp: 3454 (tst_QWebPage::loadFinished): 3455 (tst_QWebPage::database): 3456 (tst_QWebPage::testEnablePersistentStorage): 3457 (tst_QWebPage::errorPageExtension): 3458 (tst_QWebPage::screenshot): 3459 3460 2010-01-21 Simon Hausmann <simon.hausmann@nokia.com> 3461 3462 Prospective build fix for the Qt build. 3463 3464 Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView 3465 but widget.h instead and instantiating QWebView through a typedef, to ensure we're using 3466 our locally built WebKit. 3467 3468 * tests/hybridPixmap/widget.h: 3469 * tests/hybridPixmap/widget.ui: 3470 3471 2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com> 3472 3473 Reviewed by Simon Hausmann. 3474 3475 [Qt] Adding QPixmap/QImage support for the Qt hybrid layer 3476 https://bugs.webkit.org/show_bug.cgi?id=32461 3477 3478 * tests/hybridPixmap: Added. 3479 * tests/hybridPixmap/hybridPixmap.pro: Added. 3480 * tests/hybridPixmap/resources.qrc: Added. 3481 * tests/hybridPixmap/test.html: Added. 3482 * tests/hybridPixmap/tst_hybridPixmap.cpp: Added. 3483 (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for 3484 hybrid pixmap/image manipulation 3485 (tst_hybridPixmap::init): QTestLib initialization 3486 (tst_hybridPixmap::cleanup): QTestLib cleanup 3487 (tst_hybridPixmap::hybridPixmap): run the html file 3488 * tests/hybridPixmap/widget.cpp: Added. 3489 (Widget::Widget): 3490 (Widget::refreshJS): 3491 (Widget::start): 3492 (Widget::completeTest): 3493 (Widget::setPixmap): 3494 (Widget::pixmap): 3495 (Widget::setImage): 3496 (Widget::image): 3497 (Widget::~Widget): 3498 (Widget::changeEvent): 3499 (Widget::compare): 3500 (Widget::imageSlot): 3501 (Widget::pixmapSlot): 3502 (Widget::randomSlot): 3503 * tests/hybridPixmap/widget.h: Added. 3504 * tests/hybridPixmap/widget.ui: Added. 3505 * tests/tests.pro: 3506 3507 2010-01-21 Luiz Agostini <luiz.agostini@openbossa.org> 3508 3509 Reviewed by Kenneth Rohde Christiansen. 3510 3511 [Qt] Custom select popups. 3512 https://bugs.webkit.org/show_bug.cgi?id=33418 3513 3514 Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer. 3515 3516 * WebCoreSupport/ChromeClientQt.cpp: 3517 (WebCore::ChromeClientQt::createSelectPopup): 3518 * WebCoreSupport/ChromeClientQt.h: 3519 * WebCoreSupport/QtFallbackWebPopup.cpp: 3520 (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo): 3521 (WebCore::QtFallbackWebPopupCombo::showPopup): 3522 (WebCore::QtFallbackWebPopupCombo::hidePopup): 3523 (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): 3524 (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): 3525 (WebCore::QtFallbackWebPopup::show): 3526 (WebCore::QtFallbackWebPopup::hide): 3527 (WebCore::QtFallbackWebPopup::populate): 3528 * WebCoreSupport/QtFallbackWebPopup.h: 3529 3530 2010-01-19 Steve Block <steveblock@google.com> 3531 3532 Reviewed by Adam Barth. 3533 3534 Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h] 3535 https://bugs.webkit.org/show_bug.cgi?id=33801 3536 3537 * Api/qwebframe.cpp: 3538 3539 2010-01-14 Brian Weinstein <bweinstein@apple.com> 3540 3541 Reviewed by Adam Roben. 3542 3543 Drag and Drop source/destination code needs cleanup. 3544 <https://bugs.webkit.org/show_bug.cgi?id=33691>. 3545 3546 Update to new way of calling sourceOperation. 3547 3548 * WebCoreSupport/DragClientQt.cpp: 3549 (WebCore::DragClientQt::startDrag): 3550 3551 2010-01-14 Simon Hausmann <simon.hausmann@nokia.com> 3552 3553 Reviewed by Tor Arne VestbÞ. 3554 3555 [Qt] Symbian build fixes. 3556 3557 * tests/qwebpage/tst_qwebpage.cpp: Include util.h 3558 * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work. 3559 * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt. 286 3560 287 3561 2010-01-14 Simon Hausmann <simon.hausmann@nokia.com> … … 293 3567 * symbian/bwins/QtWebKitu.def: 294 3568 * symbian/eabi/QtWebKitu.def: 3569 3570 2010-01-13 Darin Adler <darin@apple.com> 3571 3572 Reviewed by Dan Bernstein. 3573 3574 Move more of the selection and caret painting code from Frame to SelectionController. 3575 https://bugs.webkit.org/show_bug.cgi?id=33619 3576 3577 * Api/qwebpage.cpp: 3578 (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this 3579 setCaretVisible here, but I updated it to call it in its new location. 3580 3581 2010-01-11 Simon Hausmann <simon.hausmann@nokia.com> 3582 3583 Reviewed by Holger Freyther. 3584 3585 [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6. 3586 3587 This is just a temporary addition until we have introduced #ifdefs to allow 3588 safely removing the private API again. 3589 3590 * Api/qwebframe.cpp: 3591 (qtwebkit_webframe_scrollRecursively): 3592 3593 2010-01-10 Robert Hogan <robert@roberthogan.net> 3594 3595 Reviewed by Adam Barth. 3596 3597 [Qt] Add enableXSSAuditor support to QWebSettings and DRT. 3598 3599 https://bugs.webkit.org/show_bug.cgi?id=33419 3600 3601 * Api/qwebsettings.cpp: 3602 (QWebSettingsPrivate::apply): 3603 * Api/qwebsettings.h: 3604 3605 2010-01-09 Daniel Bates <dbates@webkit.org> 3606 3607 No review, rolling out r53044. 3608 http://trac.webkit.org/changeset/53044 3609 https://bugs.webkit.org/show_bug.cgi?id=33419 3610 3611 We need to look into this some more because the Qt 3612 bot is failing the XSSAuditor tests. See bug #33419 3613 for more details. 3614 3615 * Api/qwebsettings.cpp: 3616 * Api/qwebsettings.h: 3617 3618 2010-01-09 Daniel Bates <dbates@webkit.org> 3619 3620 Reviewed by Adam Barth. 3621 3622 https://bugs.webkit.org/show_bug.cgi?id=33419 3623 3624 Adds support for the XSSAuditor to the Qt DRT. 3625 3626 * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled. 3627 * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled. 3628 3629 2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org> 3630 3631 Reviewed by Kenneth Rohde Christiansen. 3632 3633 [Qt] Delegation client 3634 https://bugs.webkit.org/show_bug.cgi?id=32826 3635 3636 Added method createPopup to ChromeClientQt used to create popups. 3637 QtFallbackWebPopup moved from WebCore/platform/qt to 3638 WebKit/qt/WebCoreSupport. 3639 3640 * WebCoreSupport/ChromeClientQt.cpp: 3641 (WebCore::ChromeClientQt::createPopup): 3642 * WebCoreSupport/ChromeClientQt.h: 3643 * WebCoreSupport/QtFallbackWebPopup.cpp: Added. 3644 (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): 3645 (WebCore::QtFallbackWebPopup::show): 3646 (WebCore::QtFallbackWebPopup::populate): 3647 (WebCore::QtFallbackWebPopup::showPopup): 3648 (WebCore::QtFallbackWebPopup::hidePopup): 3649 (WebCore::QtFallbackWebPopup::activeChanged): 3650 (WebCore::QtFallbackWebPopup::setParent): 3651 * WebCoreSupport/QtFallbackWebPopup.h: Added. 3652 (WebCore::QtFallbackWebPopup::hide): 3653 3654 2010-01-07 Yael Aharon <yael.aharon@nokia.com> 3655 3656 Reviewed by Kenneth Rohde Christiansen. 3657 3658 [Qt] Allow the application to override online/offline network status 3659 https://bugs.webkit.org/show_bug.cgi?id=32684 3660 3661 Add a setting so that applications can overide the network status. 3662 Applications that use this setting still need to block network access 3663 through QNAM. 3664 3665 * Api/qwebsettings.cpp: 3666 (qt_networkAccessAllowed): 3667 3668 2010-01-07 Yongjun Zhang <yongjun.zhang@nokia.com>, Laszlo Gombos <laszlo.1.gombos@nokia.com> 3669 3670 Reviewed by Simon Hausmann. 3671 3672 [Qt] need an API to suspend and resume active Javascript DOM objects. 3673 https://bugs.webkit.org/show_bug.cgi?id=31673 3674 3675 Add suspend and resume DOM objects private API to QWebFrame. 3676 3677 * Api/qwebframe.cpp: 3678 (qt_suspendActiveDOMObjects): 3679 (qt_resumeActiveDOMObjects): 3680 3681 2010-01-06 Andreas Kling <andreas.kling@nokia.com> 3682 3683 Reviewed by Simon Hausmann. 3684 3685 [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout. 3686 3687 https://bugs.webkit.org/show_bug.cgi?id=33204 3688 3689 * Api/qwebpage.cpp: 3690 (QWebPage::inputMethodQuery): 3691 3692 2010-01-05 Yael Aharon <yael.aharon@nokia.com> 3693 3694 Reviewed by Kenneth Rohde Christiansen. 3695 3696 Drag & drop layout tests fail even when run manually 3697 https://bugs.webkit.org/show_bug.cgi?id=33055 3698 3699 No new tests. Fix 3 layout tests when run manually. 3700 fast/events/drag-and-drop.html 3701 fast/events/drag-and-drop-dataTransfer-types-nocrash.html 3702 fast/events/drag-and-drop-fire-drag-dragover.html 3703 Running these tests in DRT will be fixed in 31332. 3704 3705 * Api/qwebpage.cpp: 3706 (dropActionToDragOp): 3707 (dragOpToDropAction): 3708 (QWebPagePrivate::dragEnterEvent): 3709 (QWebPagePrivate::dragMoveEvent): 3710 (QWebPagePrivate::dropEvent): 3711 Accept drag events even if they are not over a drop target. 3712 This is to ensure that drag events will continue to be delivered. 3713 3714 * Api/qwebpage_p.h: 3715 * WebCoreSupport/DragClientQt.cpp: 3716 (WebCore::dragOperationToDropActions): 3717 (WebCore::dropActionToDragOperation): 3718 (WebCore::DragClientQt::startDrag): 3719 Send dragEnd event. 3720 3721 2010-01-04 Daniel Bates <dbates@webkit.org> 3722 3723 Reviewed by Eric Seidel. 3724 3725 https://bugs.webkit.org/show_bug.cgi?id=33097 3726 3727 Cleans up the File menu to better conform to the File menu in Safari 3728 both in terms of options and keyboard shortcuts. Adds a "Quit" menu 3729 options to close all open windows. 3730 3731 * QGVLauncher/main.cpp: 3732 (MainWindow::buildUI): 3733 3734 2009-12-31 Laszlo Gombos <laszlo.1.gombos@nokia.com> 3735 3736 Reviewed by Kenneth Rohde Christiansen. 3737 3738 [Qt] Enable all HTML5 persistent features for QGVLauncher 3739 https://bugs.webkit.org/show_bug.cgi?id=33086 3740 3741 * QGVLauncher/main.cpp: Call enablePersistentStorage() 3742 (main): 3743 3744 2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com> 3745 3746 Reviewed by Simon Hausmann. 3747 3748 [Qt] It should be possible to disable inspector 3749 https://bugs.webkit.org/show_bug.cgi?id=32724 3750 3751 This change fixes the build break. Some QtWebKit interfaces 3752 will not be fully functional (most notable QWebInspector) if 3753 INSPECTOR is disabled. 3754 3755 * Api/qwebinspector.cpp: 3756 (QWebInspector::showEvent): 3757 (QWebInspector::closeEvent): 3758 * Api/qwebpage.cpp: 3759 (webActionForContextMenuAction): 3760 (QWebPagePrivate::getOrCreateInspector): 3761 (QWebPagePrivate::inspectorController): 3762 (QWebPage::triggerAction): 3763 (QWebPage::updatePositionDependentActions): 3764 * WebCoreSupport/InspectorClientQt.cpp: 3765 (WebCore::InspectorClientQt::showWindow): 3766 (WebCore::InspectorClientQt::closeWindow): 3767 3768 2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com> 3769 3770 Reviewed by Simon Hausmann. 3771 3772 Upstream Symbian def files from Qt 4.6. 3773 3774 These files define the ABI of QtWebKit on Symbian. 3775 3776 * symbian/bwins/QtWebKitu.def: Added. 3777 * symbian/eabi/QtWebKitu.def: Added. 3778 3779 2009-12-29 Daniel Bates <dbates@webkit.org> 3780 3781 Reviewed by Ariya Hidayat. 3782 3783 https://bugs.webkit.org/show_bug.cgi?id=32925 3784 3785 Adds an Open File dialog to make it convenient to open a file 3786 to view in the browser. 3787 3788 * QGVLauncher/main.cpp: 3789 (MainWindow::load): Modified to call loadURL. 3790 (MainWindow::openFile): Added. 3791 (MainWindow::loadURL): Added. 3792 (MainWindow::buildUI): Added menu item Open File. 3793 3794 2009-12-29 Robert Hogan <robert@roberthogan.net> 3795 3796 Reviewed by Eric Seidel. 3797 3798 [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html 3799 3800 Related to https://bugs.webkit.org/show_bug.cgi?id=23806 3801 3802 If an embedded document is loaded within a page and it has an empty 3803 URL, use a blank URL for the load request. 3804 3805 https://bugs.webkit.org/show_bug.cgi?id=33017 3806 3807 * WebCoreSupport/FrameLoaderClientQt.cpp: 3808 (WebCore::FrameLoaderClientQt::createFrame): 3809 3810 2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> 3811 3812 Rubber-stamped by Simon Hausmann and Holger Freyther. 3813 3814 [Qt] Remove WebKit/qt/WebKitPart empty directory 3815 3816 The content of the directory has been removed by r34888. 3817 3818 * WebKitPart: Removed. 3819 3820 2009-12-29 Jakub Wieczorek <faw217@gmail.com> 3821 3822 Reviewed by Eric Seidel. 3823 3824 [Qt] DRT: Frame loader callbacks differ from the Mac port 3825 https://bugs.webkit.org/show_bug.cgi?id=32989 3826 3827 Remove messages from the callbacks that should not dump them to match 3828 the expected results for the http/loading tests. 3829 3830 Unskip some http/loading tests which succeed now. 3831 3832 * WebCoreSupport/FrameLoaderClientQt.cpp: 3833 (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage): 3834 (WebCore::FrameLoaderClientQt::dispatchWillClose): 3835 (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon): 3836 (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld): 3837 3838 2009-12-29 Robert Hogan <robert@roberthogan.net> 3839 3840 Reviewed by Eric Seidel. 3841 3842 [Qt] fix fast/dom/Window/window-onFocus.html 3843 3844 Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where 3845 window.onblur was getting dispatched twice from QtWebKit. 3846 3847 https://bugs.webkit.org/show_bug.cgi?id=32990 3848 3849 * Api/qwebpage.cpp: 3850 (QWebPagePrivate::focusOutEvent): 3851 3852 2009-12-24 Girish Ramakrishnan <girish@forwardbias.in> 3853 3854 Reviewed by Gustavo Noronha. 3855 3856 Doc : QGraphicsWebView::zoomFactor was introduced in 4.6. 3857 3858 * Api/qgraphicswebview.cpp: 3859 3860 2009-12-22 Simon Hausmann <simon.hausmann@nokia.com> 3861 3862 Rubber-stamped by Holger Freyther. 3863 3864 Moved QtLauncher to WebKitTools/ 3865 3866 * QtLauncher: Removed. 3867 * QtLauncher/QtLauncher.pro: Removed. 3868 * QtLauncher/main.cpp: Removed. 3869 3870 2009-12-21 David Boddie <dboddie@trolltech.com> 3871 3872 Reviewed by Simon Hausmann. 3873 3874 Doc: Minor fixes to language. 3875 3876 * Api/qwebpage.cpp: 3877 3878 2009-12-21 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 3879 3880 Reviewed by Simon Hausmann. 3881 3882 [Qt] Clean up the WebKit layer unit-tests 3883 3884 - Use tests.pri for common options 3885 - Standardize file naming 3886 - Move all resources to 'resources' subdir 3887 - Standardize how TESTS_SOURCE_DIR is used 3888 - Get rid of UID3 for symbian (autogenerated) 3889 - Don't build app bundles on Mac OS X 3890 3891 * tests/benchmarks/loading/loading.pro: Added. 3892 * tests/benchmarks/loading/tst_loading.pro: Removed. 3893 * tests/benchmarks/painting/painting.pro: Added. 3894 * tests/benchmarks/painting/tst_painting.pro: Removed. 3895 * tests/qgraphicswebview/qgraphicswebview.pro: 3896 * tests/qwebelement/qwebelement.pro: 3897 * tests/qwebelement/qwebelement.qrc: Removed. 3898 * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png. 3899 * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css. 3900 * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css. 3901 * tests/qwebelement/tst_qwebelement.qrc: Added. 3902 * tests/qwebframe/qwebframe.pro: 3903 * tests/qwebframe/qwebframe.qrc: Removed. 3904 * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png. 3905 * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css. 3906 * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html. 3907 * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html. 3908 * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html. 3909 * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html. 3910 * tests/qwebframe/tst_qwebframe.cpp: 3911 * tests/qwebframe/tst_qwebframe.qrc: Added. 3912 * tests/qwebhistory/qwebhistory.pro: 3913 * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html. 3914 * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html. 3915 * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html. 3916 * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html. 3917 * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html. 3918 * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html. 3919 * tests/qwebhistory/tst_qwebhistory.cpp: 3920 (tst_QWebHistory::): 3921 * tests/qwebhistory/tst_qwebhistory.qrc: 3922 * tests/qwebhistoryinterface/qwebhistoryinterface.pro: 3923 * tests/qwebinspector/qwebinspector.pro: 3924 * tests/qwebpage/qwebpage.pro: 3925 * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html. 3926 * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html. 3927 * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html. 3928 * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html. 3929 * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html. 3930 * tests/qwebpage/tst_qwebpage.cpp: 3931 (tst_QWebPage::backActionUpdate): 3932 (tst_QWebPage::frameAt): 3933 (tst_QWebPage::errorPageExtensionInFrameset): 3934 (tst_QWebPage::screenshot): 3935 * tests/qwebpage/tst_qwebpage.qrc: 3936 * tests/qwebplugindatabase/qwebplugindatabase.pro: 3937 * tests/qwebview/qwebview.pro: 3938 * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html. 3939 * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html. 3940 * tests/qwebview/tst_qwebview.cpp: 3941 (tst_QWebView::reusePage): 3942 (tst_QWebView::crashTests): 3943 * tests/qwebview/tst_qwebview.qrc: 3944 * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png. 3945 * tests/tests.pri: Added. 3946 * tests/tests.pro: 3947 3948 2009-12-18 Ariya Hidayat <ariya.hidayat@gmail.com> 3949 3950 Build fix, not reviewed. 3951 3952 * QtLauncher/main.cpp: 3953 (MainWindow::setTouchMocking): Leave setTouchMocking as an empty 3954 function for Qt < 4.6 so that moc still creates a slot for that. 3955 Otherwise, it would have generated a linker error. 3956 3957 2009-12-18 Adam Roben <aroben@apple.com> 3958 3959 Qt build fix 3960 3961 * Api/qwebpage.cpp: Added #include. 3962 3963 2009-12-18 Adam Roben <aroben@apple.com> 3964 3965 Qt build fix 3966 3967 * Api/qwebpage.cpp: 3968 Added #includes. 295 3969 296 3970 2009-12-18 Joe Ligman <joseph.ligman@nokia.com> … … 312 3986 * tests/qwebframe/tst_qwebframe.cpp: 313 3987 314 2010-01-07 Yael Aharon <yael.aharon@nokia.com> 315 316 Reviewed by Kenneth Rohde Christiansen. 317 318 [Qt] Allow the application to override online/offline network status 319 https://bugs.webkit.org/show_bug.cgi?id=32684 320 321 Add a setting so that applications can overide the network status. 322 Applications that use this setting still need to block network access 323 through QNAM. 324 325 * Api/qwebsettings.cpp: 326 (qt_networkAccessAllowed): 327 328 2010-01-07 Yongjun Zhang <yongjun.zhang@nokia.com>, Laszlo Gombos <laszlo.1.gombos@nokia.com> 329 330 Reviewed by Simon Hausmann. 331 332 [Qt] need an API to suspend and resume active Javascript DOM objects. 333 https://bugs.webkit.org/show_bug.cgi?id=31673 334 335 Add suspend and resume DOM objects private API to QWebFrame. 336 337 * Api/qwebframe.cpp: 338 (qt_suspendActiveDOMObjects): 339 (qt_resumeActiveDOMObjects): 340 341 2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com> 342 343 Reviewed by Simon Hausmann. 344 345 Upstream Symbian def files from Qt 4.6. 346 347 These files define the ABI of QtWebKit on Symbian. 348 349 * symbian/bwins/QtWebKitu.def: Added. 350 * symbian/eabi/QtWebKitu.def: Added. 3988 2009-12-18 Simon Hausmann <simon.hausmann@nokia.com> 3989 3990 Reviewed by Tor Arne VestbÞ. 3991 3992 [Qt] Fix infinite recursion in touch mocking. 3993 3994 Don't send the fake touch events to the view, as that'll trigger the 3995 event filter again. 3996 3997 * QtLauncher/main.cpp: 3998 (MainWindow::sendTouchEvent): 3999 4000 2009-12-17 Benjamin Poulain <benjamin.poulain@nokia.com> 4001 4002 Reviewed by Simon Hausmann. 4003 4004 [Qt] Add support for mocking touch events with Q(GV)Launcher 4005 https://bugs.webkit.org/show_bug.cgi?id=32434 4006 4007 The event delivery should go through QCoreApplication::sendEvent() 4008 4009 * QtLauncher/main.cpp: 4010 (MainWindow::sendTouchEvent): 4011 4012 2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com> 4013 4014 Reviewed by Simon Hausmann. 4015 4016 [Qt] Add support for touch events in QWebView and QGraphicsWebView 4017 https://bugs.webkit.org/show_bug.cgi?id=32432 4018 4019 * Api/qgraphicswebview.cpp: 4020 (QGraphicsWebView::QGraphicsWebView): 4021 (QGraphicsWebView::sceneEvent): 4022 * Api/qwebview.cpp: 4023 (QWebView::QWebView): 4024 (QWebView::event): 4025 4026 2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com> 4027 4028 Reviewed by Simon Hausmann. 4029 4030 [Qt] Add support for mocking touch events with QtLauncher 4031 https://bugs.webkit.org/show_bug.cgi?id=32434 4032 4033 * QtLauncher/main.cpp: 4034 (MainWindow::MainWindow): 4035 (MainWindow::sendTouchEvent): 4036 (MainWindow::eventFilter): 4037 (MainWindow::setTouchMocking): 4038 (MainWindow::setupUI): 351 4039 352 4040 2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org> … … 375 4063 (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString 376 4064 377 2009-12-21 David Boddie <dboddie@trolltech.com> 378 379 Reviewed by Simon Hausmann. 380 381 Doc: Minor fixes to language. 382 383 * Api/qwebpage.cpp: 384 385 2009-12-15 Holger Hans Peter Freyther <zecke@selfish.org> 386 387 Reviewed by NOBODY (OOPS!). 4065 2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org> 4066 4067 Reviewed by Simon Hausmann. 388 4068 389 4069 [Qt] Do not disable the inspector on show and hide … … 399 4079 400 4080 * Api/qwebinspector.cpp: 401 (QWebInspector::event):402 4081 (QWebInspector::hideEvent): 4082 (QWebInspector::closeEvent): 4083 * Api/qwebinspector.h: 4084 4085 2009-12-14 Benjamin Poulain <benjamin.poulain@nokia.com> 4086 4087 Reviewed by Kenneth Rohde Christiansen. 4088 4089 [Qt] Improve the autotests of QtWebkit 4090 https://bugs.webkit.org/show_bug.cgi?id=32216 4091 4092 Refactor tst_qwebelement to remove the qWait() 4093 4094 * tests/qwebelement/tst_qwebelement.cpp: 4095 (tst_QWebElement::style): 4096 4097 2009-12-14 Andreas Kling <andreas.kling@nokia.com> 4098 4099 Reviewed by Simon Hausmann. 4100 4101 Fix the QWebPage inputMethods() autotest after r51758 4102 to compare the Qt::ImFont property's family against an explicitly 4103 previously configured family. 4104 4105 https://bugs.webkit.org/show_bug.cgi?id=32491 4106 4107 * tests/qwebpage/tst_qwebpage.cpp: 4108 (tst_QWebPage::inputMethods): 4109 4110 2009-12-13 Sam Weinig <sam@webkit.org> 4111 4112 Reviewed by Dan Bernstein. 4113 4114 Fix for https://bugs.webkit.org/show_bug.cgi?id=32499 4115 Add client based Geolocation provider 4116 4117 Add first cut of a client based Geolocation provider. This is guarded by 4118 ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a 4119 GeolocationControllerClient interface that no-one currently implements, 4120 but will in a subsequent patch. 4121 4122 * Api/qwebpage.cpp: 4123 (QWebPagePrivate::QWebPagePrivate): 4124 4125 2009-12-13 Benjamin Poulain <benjamin.poulain@nokia.com> 4126 4127 Reviewed by Simon Hausmann. 4128 4129 Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005 4130 https://bugs.webkit.org/show_bug.cgi?id=29008 4131 4132 * tests/qwebframe/tst_qwebframe.cpp: 403 4133 404 4134 2009-12-13 Simon Hausmann <hausmann@webkit.org> … … 415 4145 * Api/qwebview.h: 416 4146 4147 2009-12-11 Yael Aharon <yael.aharon@nokia.com> 4148 4149 Unreviewed build fix for Qt versions < 4.6. 4150 4151 * tests/qwebframe/tst_qwebframe.cpp: 4152 * tests/qwebview/tst_qwebview.cpp: 4153 (tst_QWebView::reusePage): 4154 4155 2009-12-11 Girish Ramakrishnan <girish@forwardbias.in> 4156 4157 Reviewed by Tor Arne VestbÞ. 4158 4159 [Qt] Updated QWebElement documentation 4160 4161 findAll() returns a QWebElementCollection, not QList<QWebElement>. 4162 4163 * docs/webkitsnippets/webelement/main.cpp: 4164 (findAll): 4165 4166 2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com> 4167 4168 Reviewed by Antti Koivisto. 4169 4170 Forward Qt touch events to the event handler as platform touch events. 4171 4172 https://bugs.webkit.org/show_bug.cgi?id=32114 4173 4174 * Api/qwebpage.cpp: 4175 (QWebPagePrivate::touchEvent): 4176 (QWebPage::event): 4177 * Api/qwebpage_p.h: 4178 4179 2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com> 4180 4181 Reviewed by Kenneth Rohde Christiansen. 4182 4183 [Qt] Improve the autotests of QtWebkit 4184 https://bugs.webkit.org/show_bug.cgi?id=32216 4185 4186 Remove the calls to qWait() of the autotest of QWebView 4187 4188 * tests/qwebview/tst_qwebview.cpp: 4189 (tst_QWebView::reusePage): 4190 4191 2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com> 4192 4193 Reviewed by Kenneth Rohde Christiansen. 4194 4195 [Qt] Improve the autotests of QtWebkit 4196 https://bugs.webkit.org/show_bug.cgi?id=32216 4197 4198 Refactor tst_qwebframe to remove qWait() and use 4199 the function waitForSignal() from util.h 4200 4201 * tests/qwebframe/tst_qwebframe.cpp: 4202 4203 2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com> 4204 4205 Reviewed by Kenneth Rohde Christiansen. 4206 4207 [Qt] Improve the autotests of QtWebkit 4208 https://bugs.webkit.org/show_bug.cgi?id=32216 4209 4210 Refactor the test of QGraphicsWebView: 4211 -make waitForSignal() available to all the tests. 4212 -remove QTest::qWait() 4213 4214 * tests/qgraphicswebview/tst_qgraphicswebview.cpp: 4215 (tst_QGraphicsWebView::crashOnViewlessWebPages): 4216 * tests/util.h: 4217 (waitForSignal): 4218 4219 2009-12-07 Girish Ramakrishnan <girish@forwardbias.in> 4220 4221 Reviewed by Simon Hausmann. 4222 4223 [Qt] Plugins: Force windowless mode when there is no native window handle 4224 4225 Inject wmode=opaque while instantiating the plugin for the case when the 4226 webpage is not backed by a native window handle. 4227 4228 https://bugs.webkit.org/show_bug.cgi?id=32059 4229 4230 * WebCoreSupport/FrameLoaderClientQt.cpp: 4231 (WebCore::FrameLoaderClientQt::createPlugin): 4232 4233 2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4234 4235 Reviewed by Kenneth Rohde Christiansen. 4236 4237 [Qt] Corrects QtLauncher style 4238 4239 * QtLauncher/main.cpp: 4240 (WebPage::acceptNavigationRequest): 4241 (MainWindow::MainWindow): 4242 (MainWindow::webPage): 4243 (MainWindow::webView): 4244 (MainWindow::changeLocation): 4245 (MainWindow::loadFinished): 4246 (MainWindow::showLinkHover): 4247 (MainWindow::zoomIn): 4248 (MainWindow::zoomOut): 4249 (MainWindow::print): 4250 (MainWindow::setEditable): 4251 (MainWindow::dumpHtml): 4252 (MainWindow::selectElements): 4253 (MainWindow::newWindow): 4254 (MainWindow::setupUI): 4255 (WebPage::createWindow): 4256 (WebPage::createPlugin): 4257 (main): 4258 4259 2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4260 4261 Reviewed by Kenneth Rohde Christiansen. 4262 4263 [Qt] QtLauncher: add a menu to show or hide the web inspector. 4264 https://bugs.webkit.org/show_bug.cgi?id=32149 4265 4266 * QtLauncher/main.cpp: 4267 (WebInspector::WebInspector): 4268 (WebInspector::showEvent): 4269 (WebInspector::hideEvent): 4270 (MainWindow::MainWindow): 4271 (MainWindow::setupUI): 4272 4273 2009-12-04 Kenneth Rohde Christiansen <kenneth@webkit.org> 4274 4275 Reviewed by Antti Koivisto. 4276 4277 Split out the renderPrivate in two methods, one for working on 4278 relative coordinates (relative to the viewport) and one for 4279 working on absolute coordinates. The latter is more effecient 4280 for implementing tiling, as you don't need translate the coords, 4281 and because it avoid clipping to the viewport. 4282 4283 No behaviour changes, so no new tests. 4284 4285 * Api/qwebframe.cpp: 4286 (QWebFramePrivate::renderContentsLayerAbsoluteCoords): 4287 (QWebFramePrivate::renderRelativeCoords): 4288 (QWebFrame::render): 4289 * Api/qwebframe_p.h: 4290 4291 2009-12-04 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 4292 4293 Reviewed by Simon Hausmann. 4294 4295 [Qt] Allow removing 'qrc' as a local security origin scheme 4296 4297 * tests/qwebpage/tst_qwebpage.cpp: 4298 4299 2009-12-04 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 4300 4301 Reviewed by Simon Hausmann. 4302 4303 [Qt] Clean up argument parsing in the QtLauncher 4304 4305 * QtLauncher/main.cpp: 4306 4307 2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4308 4309 Reviewed by Kenneth Rohde Christiansen. 4310 4311 [Qt] Prevent the inspector from closing its wrapping widget. 4312 This is not necessary anymore since we now hide the embedded 4313 close button. 4314 https://bugs.webkit.org/show_bug.cgi?id=32149 4315 4316 * WebCoreSupport/InspectorClientQt.cpp: 4317 (WebCore::InspectorClientQt::showWindow): 4318 (WebCore::InspectorClientQt::closeWindow): 4319 4320 2009-12-03 İsmail Dönmez <ismail@namtrac.org> 4321 4322 Reviewed by Eric Seidel. 4323 4324 Fix compilation when SVG is disabled. 4325 4326 * Api/qwebframe.cpp: 4327 (qt_drt_pauseSVGAnimation): 4328 4329 2009-12-03 Brady Eidson <beidson@apple.com> 4330 4331 Reviewed by Sam Weinig. 4332 4333 <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API 4334 4335 * WebCoreSupport/FrameLoaderClientQt.cpp: 4336 (WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage): 4337 (WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage): 4338 (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage): 4339 * WebCoreSupport/FrameLoaderClientQt.h: 4340 4341 2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com> 4342 4343 Reviewed by Timothy Hatcher. 4344 4345 Web Inspector: Simplify the settings support in inspector controller. 4346 4347 https://bugs.webkit.org/show_bug.cgi?id=32076 4348 4349 * WebCoreSupport/InspectorClientQt.cpp: 4350 (WebCore::InspectorClientQt::populateSetting): 4351 (WebCore::InspectorClientQt::storeSetting): 4352 (WebCore::variantToSetting): 4353 (WebCore::settingToVariant): 4354 * WebCoreSupport/InspectorClientQt.h: 4355 4356 2009-12-03 Ben Murdoch <benm@google.com> 4357 4358 Reviewed by Brady Eidson. 4359 4360 [Android] The FrameLoaderClient is unaware of BackForwardList changes. 4361 https://bugs.webkit.org/show_bug.cgi?id=31914 4362 4363 * WebCoreSupport/FrameLoaderClientQt.cpp: 4364 (WebCore::FrameLoaderClientQt::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). 4365 (WebCore::FrameLoaderClientQt::dispatchDidRemoveBackForwardItem): ditto. 4366 (WebCore::FrameLoaderClientQt::dispatchDidChangeBackForwardIndex): ditto. 4367 * WebCoreSupport/FrameLoaderClientQt.h: 4368 4369 2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com> 4370 4371 Not reviewed. Try to fix Qt build. 4372 4373 * Api/qwebframe.cpp: 4374 (qt_drt_pauseSVGAnimation): 4375 4376 2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com> 4377 4378 Reviewed by Simon Fraser. 4379 4380 Add SVG animation test framework with 'snapshot' functionality 4381 https://bugs.webkit.org/show_bug.cgi?id=31897 4382 4383 Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method, 4384 forwarding the call to SVGDocumentExtensions, if SVG is enabled. 4385 4386 Implemented just like the existing pauseAnimation* methods for CSS animations. 4387 4388 * Api/qwebframe.cpp: 4389 (qt_drt_pauseSVGAnimation): 4390 4391 2009-12-01 Daniel Bates <dbates@webkit.org> 4392 4393 Reviewed by Kenneth Rohde Christiansen. 4394 4395 https://bugs.webkit.org/show_bug.cgi?id=31898 4396 4397 Makes QtLauncher default to the http scheme for URLs. 4398 4399 * QtLauncher/main.cpp: 4400 (MainWindow::MainWindow): 4401 (MainWindow::changeLocation): 4402 (main): 4403 417 4404 2009-11-30 Abhinav Mithal <abhinav.mithal@nokia.com> 418 4405 … … 424 4411 * Api/qwebpage.cpp: 425 4412 (QWebPage::userAgentForUrl): 4413 4414 2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com> 4415 4416 Reviewed by Kenneth Rohde Christiansen. 4417 4418 [Qt] Fix minor waning in QtWebKit 4419 https://bugs.webkit.org/show_bug.cgi?id=31963 4420 4421 * tests/qwebpage/tst_qwebpage.cpp: 4422 (ErrorPage::extension): Remove info wariable as it is 4423 not used. 426 4424 427 4425 2009-11-28 Simon Hausmann <simon.hausmann@nokia.com> … … 440 4438 * tests/qwebpage/tst_qwebpage.cpp: 441 4439 (tst_QWebPage::inputMethods): 4440 4441 2009-11-26 Simon Hausmann <simon.hausmann@nokia.com> 4442 4443 Rubber-stamped by Holger Freyther. 4444 4445 Removed unused ICO image plugin handler. 4446 4447 * Plugins/ICOHandler.cpp: Removed. 4448 * Plugins/ICOHandler.h: Removed. 4449 * Plugins/Plugins.pro: Removed. 4450 4451 2009-11-12 Holger Hans Peter Freyther <zecke@selfish.org> 4452 4453 Reviewed by Kenneth Rohde Christiansen. 4454 4455 [Qt] Do not show the QWidget when the WebCore::Widget is hidden 4456 https://bugs.webkit.org/show_bug.cgi?id=31203 4457 4458 The clipping code was making a QWidget visible even if the 4459 WebCore::Widget was hidden. Fix the bug by calling setVisible 4460 only if the WebCore::Widget Widget::isSelfVisible. 4461 4462 * WebCoreSupport/FrameLoaderClientQt.cpp: 4463 (WebCore::QtPluginWidget::show): Override WebCore::Widget::show to call handleVisibility 4464 (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible 4465 (FrameLoaderClientQt::createPlugin): Hide the QWidget by default 442 4466 443 4467 2009-11-23 David Boddie <dboddie@trolltech.com> … … 468 4492 469 4493 * tests/qwebframe/tst_qwebframe.cpp: 4494 4495 2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4496 4497 Reviewed by Kenneth Rohde Christiansen. 4498 4499 [Qt] Add instantiation tests for QWebInspector. 4500 4501 * tests/qwebinspector/qwebinspector.pro: Added. 4502 * tests/qwebinspector/tst_qwebinspector.cpp: Added. 4503 (tst_QWebInspector::attachAndDestroy): 4504 * tests/tests.pro: 4505 4506 2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4507 4508 Reviewed by Kenneth Rohde Christiansen. 4509 4510 [Qt] Fix QWebInspector destruction problem. 4511 https://bugs.webkit.org/show_bug.cgi?id=31664 4512 4513 * Api/qwebpage.cpp: 4514 (QWebPage::~QWebPage): 470 4515 471 4516 2009-11-19 Olivier Goffart <ogoffart@trolltech.com> … … 488 4533 (tst_QWebPage::database): 489 4534 4535 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com> 4536 4537 Reviewed by Kenneth Rohde Christiansen. 4538 4539 [Qt] Remove support for Qt v4.3 or older versions 4540 https://bugs.webkit.org/show_bug.cgi?id=29469 4541 4542 * Api/qcookiejar.cpp: Removed. 4543 * Api/qcookiejar.h: Removed. 4544 * Api/qgraphicswebview.cpp: 4545 (QGraphicsWebView::event): 4546 * Api/qwebframe.cpp: 4547 (QWebFrame::load): 4548 * Api/qwebframe.h: 4549 * Api/qwebkitglobal.h: 4550 * Api/qwebnetworkinterface.cpp: Removed. 4551 * Api/qwebnetworkinterface.h: Removed. 4552 * Api/qwebnetworkinterface_p.h: Removed. 4553 * Api/qwebpage.cpp: 4554 (QWebPagePrivate::QWebPagePrivate): 4555 (QWebPagePrivate::acceptNavigationRequest): 4556 (QWebPage::acceptNavigationRequest): 4557 (QWebPage::action): 4558 (QWebPage::userAgentForUrl): 4559 * Api/qwebpage.h: 4560 * Api/qwebpage_p.h: 4561 * Api/qwebview.cpp: 4562 (QWebView::load): 4563 (QWebView::event): 4564 * Api/qwebview.h: 4565 * QtLauncher/main.cpp: 4566 (MainWindow::print): 4567 (MainWindow::setupUI): 4568 (main): 4569 * WebCoreSupport/FrameLoaderClientQt.cpp: 4570 (WebCore::FrameLoaderClientQt::download): 4571 (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction): 4572 (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction): 4573 (WebCore::FrameLoaderClientQt::startDownload): 4574 (WebCore::FrameLoaderClientQt::createPlugin): 4575 4576 2009-11-18 Shu Chang <Chang.Shu@nokia.com> 4577 4578 Reviewed by Eric Seidel. 4579 4580 [Qt] Add support for displaying deleteButton. 4581 https://bugs.webkit.org/show_bug.cgi?id=31560 4582 4583 Test: LayoutTests/editing/deleting/5408255.html 4584 4585 * Api/qwebsettings.cpp: 4586 (graphics): 4587 * Api/qwebsettings.h: 4588 490 4589 2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com> 491 4590 … … 506 4605 * docs/qtwebkit.qdoc: 507 4606 508 2009-11-18 Simon Hausmann <simon.hausmann@nokia.com> 509 510 Reviewed and suggested by Tor Arne VestbÞ. 511 512 Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f 513 to compare the Qt::ImFont property's family against an explicitly 514 previously configured family. 4607 2009-11-18 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 4608 4609 Reviewed by Simon Hausmann. 4610 4611 [Qt] Add QtLauncher support for opening links in the default browser 4612 4613 This can be triggered by either the context menu or by clicking a link 4614 while holding down the Alt key. Opening a link in a new windows is 4615 triggered by holding down Shift. 4616 4617 * QtLauncher/main.cpp: 4618 4619 2009-11-17 Yael Aharon <yael.aharon@nokia.com> 4620 4621 Reviewed by Kenneth Rohde Christiansen. 4622 4623 [Qt] QGLLauncher does not support drag&drop of local files 4624 https://bugs.webkit.org/show_bug.cgi?id=31057 4625 4626 Enable accepting files in QGraphicsWebView. 4627 4628 * Api/qgraphicswebview.cpp: 4629 (QGraphicsWebView::QGraphicsWebView): 4630 (QGraphicsWebView::dragEnterEvent): 4631 4632 2009-11-17 Antonio Gomes <tonikitoo@webkit.org> 4633 4634 Reviewed by Kenneth Christiansen. 4635 4636 [Qt] better test coverage for ErrorPageExtension 4637 https://bugs.webkit.org/show_bug.cgi?id=31583 4638 4639 Improved the coverage of current ErrorPageExtension tests by 4640 adding autotests involving frameset and iframes. 515 4641 516 4642 * tests/qwebpage/tst_qwebpage.cpp: 517 (tst_QWebPage::inputMethods): 4643 (ErrorPage::extension): Make the ErrorPageExtension 4644 to work for all frames, not only the main frame. 4645 (tst_QWebPage::errorPageExtension): Stop using 4646 the 'frameset.html' resouce in this method since 4647 an autotest specific for frameset's is being added. 4648 (tst_QWebPage::errorPageExtensionInIFrames): Added. 4649 (tst_QWebPage::errorPageExtensionInFrameset): Added. 518 4650 519 4651 2009-11-16 Simon Hausmann <simon.hausmann@nokia.com> … … 540 4672 (tst_QWebPage::errorPageExtension): 541 4673 542 2009-11-16 Holger Hans Peter Freyther <zecke@selfish.org> 543 544 Reviewed by NOBODY (OOPS!). 545 546 [Qt] Do not show the QWidget when the WebCore::Widget is hidden 547 https://bugs.webkit.org/show_bug.cgi?id=31203 548 549 The clipping code was making a QWidget visible even if the 550 WebCore::Widget was hidden. Fix the bug by calling setVisible 551 only if the WebCore::Widget is shown. 4674 2009-11-13 Adam Roben <aroben@apple.com> 4675 4676 Update for changes to FrameLoaderClient 4677 4678 Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when 4679 window objects in isolated worlds are cleared 4680 4681 Reviewed by Dave Hyatt. 552 4682 553 4683 * WebCoreSupport/FrameLoaderClientQt.cpp: 554 (WebCore::QtPluginWidget::show): Override WebCore::Widget 555 (WebCore::QtPluginWidget::hide): Override WebCore::Widget 556 (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible 557 (FrameLoaderClientQt::createPlugin): Hide the QWidget by default 558 559 2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com> 560 561 Reviewed by Kenneth Rohde Christiansen. 562 563 https://bugs.webkit.org/show_bug.cgi?id=30628 564 Add an API to get all the attributes from a QWebElement. 565 566 * Api/qwebelement.cpp: 567 (QWebElement::attributesName): 568 * Api/qwebelement.h: 569 * tests/qwebelement/tst_qwebelement.cpp: 570 (tst_QWebElement::listAttributes): 4684 (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld): 4685 * WebCoreSupport/FrameLoaderClientQt.h: 4686 Replaced windowObjectCleared with this function. Does nothing if the 4687 passed-in world is not the mainThreadNormalWorld(). 571 4688 572 4689 2009-11-13 Andras Becsi <becsi.andras@stud.u-szeged.hu> … … 581 4698 (QWebSettings::setMaximumPagesInCache): 582 4699 4700 2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 4701 4702 Reviewed by Kenneth Rohde Christiansen. 4703 4704 [Qt] Fix initial QWebView focus behavior. 4705 4706 focusController->setFocused(true) was not always called. 4707 https://bugs.webkit.org/show_bug.cgi?id=31466 4708 4709 * Api/qwebpage.cpp: 4710 (QWebPagePrivate::focusInEvent): 4711 583 4712 2009-11-13 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com> 584 4713 … … 601 4730 * docs/docs.pri: 602 4731 4732 2009-11-12 Shinichiro Hamaji <hamaji@chromium.org> 4733 4734 Reviewed by Darin Adler. 4735 4736 externalRepresentation should take Frame as the argument 4737 https://bugs.webkit.org/show_bug.cgi?id=31393 4738 4739 No new tests as this is just a refactoring. 4740 4741 * Api/qwebframe.cpp: 4742 (QWebFrame::renderTreeDump): 4743 603 4744 2009-11-12 Antonio Gomes <tonikitoo@webkit.org> 604 4745 … … 612 4753 613 4754 * Api/qwebpage.cpp: 614 615 2009-11-11 Antonio Gomes <tonikitoo@webkit.org>616 617 Reviewed by Kenneth Christiansen.618 619 [Qt] Various doc fixes620 https://bugs.webkit.org/show_bug.cgi?id=31358621 622 Fixed wrong documentation: item's dimensions do fit to Web page623 content by default.624 625 Kenneth agreed to land this as a followup patch to the626 just landed documentation patch.627 628 * Api/qgraphicswebview.cpp:629 630 2009-11-11 David Boddie <dboddie@trolltech.com>631 632 Reviewed by Kenneth Christiansen.633 634 [Qt] Various doc fixes635 https://bugs.webkit.org/show_bug.cgi?id=31323636 637 Fixed and synchronized QWebView related documentation.638 639 * Api/qgraphicswebview.cpp:640 * Api/qwebview.cpp:641 642 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>643 644 Reviewed by Kenneth Rohde Christiansen.645 646 [Qt] Few classes have virtual functions but non-virtual destructor647 https://bugs.webkit.org/show_bug.cgi?id=31269648 649 * Api/qgraphicswebview.cpp:650 (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual651 destructor.652 653 2009-10-30 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com>654 655 Reviewed by NOBODY (OOPS!).656 657 [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()658 659 This ensures that long-running JavaScript (for example due to a modal alert() dialog),660 will not trigger a deferred load after only 500ms (the default tokenizer delay) while661 still giving a reasonable timeout (10 seconds) to prevent deadlock.662 663 https://bugs.webkit.org/show_bug.cgi?id=29381664 665 * Api/qwebframe.cpp: Document the behaviour666 * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads667 * tests/qwebframe/tst_qwebframe.cpp: Add test668 669 2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>670 671 Reviewed by Kenneth Rohde Christiansen.672 673 [Qt] Fix initial QWebView focus behavior.674 675 focusController->setFocused(true) was not always called.676 https://bugs.webkit.org/show_bug.cgi?id=31466677 678 * Api/qwebpage.cpp:679 (QWebPagePrivate::focusInEvent):680 4755 681 4756 2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com> … … 694 4769 * Api/qwebsettings.h: 695 4770 4771 2009-11-11 Antonio Gomes <tonikitoo@webkit.org> 4772 4773 Reviewed by Kenneth Christiansen. 4774 4775 [Qt] Various doc fixes 4776 https://bugs.webkit.org/show_bug.cgi?id=31358 4777 4778 Fixed wrong documentation: item's dimensions do fit to Web page 4779 content by default. 4780 4781 Kenneth agreed to land this as a followup patch to the 4782 just landed documentation patch. 4783 4784 * Api/qgraphicswebview.cpp: 4785 4786 2009-11-11 David Boddie <dboddie@trolltech.com> 4787 4788 Reviewed by Kenneth Christiansen. 4789 4790 [Qt] Various doc fixes 4791 https://bugs.webkit.org/show_bug.cgi?id=31323 4792 4793 Fixed and synchronized QWebView related documentation. 4794 4795 * Api/qgraphicswebview.cpp: 4796 * Api/qwebview.cpp: 4797 4798 2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org> 4799 4800 Unreviewed buildbot fix. 4801 4802 Export a method to the DRT to know if the document has a 4803 document element. 4804 4805 * Api/qwebframe.cpp: 4806 (qt_drt_hasDocumentElement): 4807 696 4808 2009-11-11 Liang QI <liang.qi@nokia.com> 697 Update documentation for the Qt API698 699 * Api/qgraphicswebview.cpp:700 * Api/qwebelement.cpp:701 * Api/qwebframe.cpp:702 * Api/qwebsettings.cpp:703 * Api/qwebview.cpp:704 705 2009-11-13 Tor Arne VestbÞ <tor.arne.vestbo@nokia.com>706 707 Reviewed by Simon Hausmann.708 709 4809 710 4810 [Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian. … … 755 4855 * Api/qwebview.cpp: 756 4856 757 2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> 758 759 Unreviewed documentation fixes. 760 761 Added a few improvements from Jocelyn Turcotte to the 762 createWindow docs. 763 764 * Api/qwebview.cpp: 765 766 2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> 767 768 Unreviewed documentation fix. 769 770 [Qt] Make qwebpage's createWindow not qwebview dependent. 771 https://bugs.webkit.org/show_bug.cgi?id=30771 772 773 Update documentation to make it clear that a reimplementation 774 of the createWindow method of the associated QWebPage can 775 result in the QWebView::createWindow method to never be called. 776 777 * Api/qwebview.cpp: 4857 2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com> 4858 4859 Reviewed by Kenneth Rohde Christiansen. 4860 4861 https://bugs.webkit.org/show_bug.cgi?id=31323 4862 Fix a few compiler warnings 4863 4864 * tests/qwebframe/tst_qwebframe.cpp: Add extra brackets 4865 to make it explicit where the else case belongs 778 4866 779 4867 2009-11-11 Simon Hausmann <simon.hausmann@nokia.com> … … 798 4886 (tst_QWebPage::inputMethods): Modify the test to verify that SIPR 799 4887 events are dispatched when activating focusable content. 4888 4889 2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> 4890 4891 Unreviewed documentation fixes. 4892 4893 Added a few improvements from Jocelyn Turcotte to the 4894 createWindow docs. 4895 4896 * Api/qwebview.cpp: 4897 4898 2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> 4899 4900 Unreviewed documentation fix. 4901 4902 [Qt] Make qwebpage's createWindow not qwebview dependent. 4903 https://bugs.webkit.org/show_bug.cgi?id=30771 4904 4905 Update documentation to make it clear that a reimplementation 4906 of the createWindow method of the associated QWebPage can 4907 result in the QWebView::createWindow method to never be called. 4908 4909 * Api/qwebview.cpp: 4910 4911 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> 4912 4913 Reviewed by Kenneth Rohde Christiansen. 4914 4915 [Qt] Few classes have virtual functions but non-virtual destructor 4916 https://bugs.webkit.org/show_bug.cgi?id=31269 4917 4918 * Api/qgraphicswebview.cpp: 4919 (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual 4920 destructor. 4921 4922 2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com> 4923 4924 Reviewed by Kenneth Rohde Christiansen. 4925 4926 https://bugs.webkit.org/show_bug.cgi?id=30628 4927 Add an API to get all the attributes from a QWebElement. 4928 4929 * Api/qwebelement.cpp: 4930 (QWebElement::attributesName): 4931 * Api/qwebelement.h: 4932 * tests/qwebelement/tst_qwebelement.cpp: 4933 (tst_QWebElement::listAttributes): 4934 4935 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> 4936 4937 Reviewed by Kenneth Rohde Christiansen. 4938 4939 Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings 4940 https://bugs.webkit.org/show_bug.cgi?id=31040 4941 4942 * Api/qwebpage.cpp: 4943 (QWebPagePrivate::handleScrolling): 4944 4945 2009-11-09 Mark Mentovai <mark@chromium.org> 4946 4947 Reviewed by Dan Bernstein. 4948 4949 Track "can have scrollbar" state within FrameView independently of the 4950 individual scrollbar states in ScrollView. 4951 4952 rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167 4953 REGRESSION (r48064): mint.com loses scrollbars after coming out of 4954 edit mode. 4955 4956 rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517 4957 REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store. 4958 4959 Test: fast/overflow/scrollbar-restored.html 4960 4961 * Api/qwebframe.cpp: 4962 (QWebFrame::setScrollBarPolicy): 800 4963 801 4964 2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com> … … 972 5135 * Api/qgraphicswebview.h: 973 5136 5137 2009-11-05 Shu Chang <Chang.Shu@nokia.com> 5138 5139 Reviewed by Tor Arne VestbÞ. 5140 5141 Add support for Shift-PageUp and Shift-PageDown key events. 5142 https://bugs.webkit.org/show_bug.cgi?id=31166 5143 5144 Test: LayoutTests/editing/selection/shrink-selection-after-shift-pagedown.html 5145 5146 * WebCoreSupport/EditorClientQt.cpp: 5147 (WebCore::EditorClientQt::handleKeyboardEvent): 5148 974 5149 2009-11-05 Simon Hausmann <hausmann@webkit.org> 975 5150 … … 1150 5325 (WebViewCrashTest::loading): 1151 5326 (tst_QWebView::crashTests): 5327 5328 2009-11-01 Laszlo Gombos <laszlo.1.gombos@nokia.com> 5329 5330 Reviewed by Eric Seidel. 5331 5332 Turn on warnings for QtWebKit for gcc 5333 https://bugs.webkit.org/show_bug.cgi?id=30958 5334 5335 * Api/qwebpage.cpp: 5336 (QWebPagePrivate::QWebPagePrivate): Reorder initialization list 5337 to fix compiler warnings. 5338 * WebCoreSupport/FrameLoaderClientQt.cpp: 5339 (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Ditto. 5340 5341 2009-10-30 Evan Stade <estade@chromium.org> 5342 5343 Reviewed by David Levin. 5344 5345 Notify the chrome when the focused node has changed. 5346 https://bugs.webkit.org/show_bug.cgi?id=30832 5347 5348 Added stub implementation for new ChromeClient function. 5349 5350 * WebCoreSupport/ChromeClientQt.cpp: 5351 (WebCore::ChromeClientQt::focusedNodeChanged): 5352 * WebCoreSupport/ChromeClientQt.h: 1152 5353 1153 5354 2009-10-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r651 r846 26 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 #include "config.h" 29 30 #include "ChromeClientQt.h" … … 36 37 #include "FrameView.h" 37 38 #include "HitTestResult.h" 39 #include "Icon.h" 38 40 #include "NotImplemented.h" 41 #include "ScrollbarTheme.h" 39 42 #include "WindowFeatures.h" 40 43 #include "DatabaseTracker.h" 44 #if defined(Q_WS_MAEMO_5) 45 #include "QtMaemoWebPopup.h" 46 #else 47 #include "QtFallbackWebPopup.h" 48 #endif 49 #include "QWebPageClient.h" 41 50 #include "SecurityOrigin.h" 42 #include "QWebPageClient.h" 51 52 #include <qdebug.h> 53 #include <qeventloop.h> 54 #include <qtextdocument.h> 55 #include <qtooltip.h> 43 56 44 57 #include "qwebpage.h" … … 49 62 #include "qwebview.h" 50 63 51 #include <qtooltip.h> 52 #include <qtextdocument.h> 53 54 namespace WebCore 55 { 56 64 #if USE(ACCELERATED_COMPOSITING) 65 #include "GraphicsLayerQt.h" 66 #endif 67 68 namespace WebCore { 57 69 58 70 ChromeClientQt::ChromeClientQt(QWebPage* webPage) 59 71 : m_webPage(webPage) 72 , m_eventLoop(0) 60 73 { 61 74 toolBarsVisible = statusBarVisible = menuBarVisible = true; … … 64 77 ChromeClientQt::~ChromeClientQt() 65 78 { 66 79 if (m_eventLoop) 80 m_eventLoop->exit(); 67 81 } 68 82 … … 142 156 143 157 158 void ChromeClientQt::focusedNodeChanged(WebCore::Node*) 159 { 160 } 161 162 144 163 Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features) 145 164 { … … 147 166 if (!newPage) 148 167 return 0; 149 newPage->mainFrame()->load(request.resourceRequest().url()); 168 169 // A call to QWebPage::mainFrame() implicitly creates the main frame. 170 // Make sure it exists, as WebCore expects it when returning from this call. 171 QWebFrame* mainFrame = newPage->mainFrame(); 172 173 if (!request.isEmpty()) 174 mainFrame->load(request.resourceRequest().url()); 150 175 return newPage->d->page; 151 176 } … … 164 189 bool ChromeClientQt::canRunModal() 165 190 { 166 notImplemented(); 167 return false; 191 return true; 168 192 } 169 193 … … 171 195 void ChromeClientQt::runModal() 172 196 { 173 notImplemented(); 197 m_eventLoop = new QEventLoop(); 198 QEventLoop* eventLoop = m_eventLoop; 199 m_eventLoop->exec(); 200 delete eventLoop; 174 201 } 175 202 … … 310 337 IntRect ChromeClientQt::windowResizerRect() const 311 338 { 339 #if defined(Q_WS_MAC) 340 if (!m_webPage) 341 return IntRect(); 342 343 QWebPageClient* pageClient = platformPageClient(); 344 if (!pageClient) 345 return IntRect(); 346 347 QWidget* ownerWidget = pageClient->ownerWidget(); 348 if (!ownerWidget) 349 return IntRect(); 350 351 QWidget* topLevelWidget = ownerWidget->topLevelWidget(); 352 QRect topLevelGeometry(topLevelWidget->geometry()); 353 354 // There's no API in Qt to query for the size of the resizer, so we assume 355 // it has the same width and height as the scrollbar thickness. 356 int scollbarThickness = ScrollbarTheme::nativeTheme()->scrollbarThickness(); 357 358 // There's no API in Qt to query for the position of the resizer. Sometimes 359 // it's drawn by the system, and sometimes it's a QSizeGrip. For RTL locales 360 // it might even be on the lower left side of the window, but in WebKit we 361 // always draw scrollbars on the right hand side, so we assume this to be the 362 // location when computing the resize rect to reserve for WebKit. 363 QPoint resizeCornerTopLeft = ownerWidget->mapFrom(topLevelWidget, 364 QPoint(topLevelGeometry.width(), topLevelGeometry.height()) 365 - QPoint(scollbarThickness, scollbarThickness)); 366 367 QRect resizeCornerRect = QRect(resizeCornerTopLeft, QSize(scollbarThickness, scollbarThickness)); 368 return resizeCornerRect.intersected(pageClient->geometryRelativeToOwnerWidget()); 369 #else 312 370 return IntRect(); 313 } 314 315 void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool) 371 #endif 372 } 373 374 void ChromeClientQt::invalidateWindow(const IntRect&, bool) 375 { 376 notImplemented(); 377 } 378 379 void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate) 316 380 { 317 381 // No double buffer, so only update the QWidget if content changed. 318 if (contentChanged) { 319 if (platformPageClient()) { 320 QRect rect(windowRect); 321 rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); 322 if (!rect.isEmpty()) 323 platformPageClient()->update(rect); 324 } 325 emit m_webPage->repaintRequested(windowRect); 382 if (platformPageClient()) { 383 QRect rect(windowRect); 384 rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); 385 if (!rect.isEmpty()) 386 platformPageClient()->update(rect); 326 387 } 388 emit m_webPage->repaintRequested(windowRect); 327 389 328 390 // FIXME: There is no "immediate" support for window painting. This should be done always whenever the flag 329 391 // is set. 392 } 393 394 void ChromeClientQt::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate) 395 { 396 invalidateContentsAndWindow(windowRect, immediate); 330 397 } 331 398 … … 449 516 } 450 517 518 void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, PassRefPtr<FileChooser> chooser) 519 { 520 chooser->iconLoaded(Icon::createIconForFiles(filenames)); 521 } 522 451 523 bool ChromeClientQt::setCursor(PlatformCursorHandle) 452 524 { … … 461 533 } 462 534 463 } 535 #if USE(ACCELERATED_COMPOSITING) 536 void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) 537 { 538 if (platformPageClient()) 539 platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0); 540 } 541 542 void ChromeClientQt::setNeedsOneShotDrawingSynchronization() 543 { 544 // we want the layers to synchronize next time we update the screen anyway 545 if (platformPageClient()) 546 platformPageClient()->markForSync(false); 547 } 548 549 void ChromeClientQt::scheduleCompositingLayerSync() 550 { 551 // we want the layers to synchronize ASAP 552 if (platformPageClient()) 553 platformPageClient()->markForSync(true); 554 } 555 556 bool ChromeClientQt::allowsAcceleratedCompositing() const 557 { 558 return (platformPageClient() && platformPageClient()->allowsAcceleratedCompositing()); 559 } 560 561 #endif 562 563 #if ENABLE(TILED_BACKING_STORE) 564 IntRect ChromeClientQt::visibleRectForTiledBackingStore() const 565 { 566 if (!platformPageClient() || !m_webPage) 567 return IntRect(); 568 569 if (!platformPageClient()->viewResizesToContentsEnabled()) 570 return QRect(m_webPage->mainFrame()->scrollPosition(), m_webPage->mainFrame()->geometry().size()); 571 572 return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect())); 573 } 574 #endif 575 576 QtAbstractWebPopup* ChromeClientQt::createSelectPopup() 577 { 578 #if defined(Q_WS_MAEMO_5) 579 return new QtMaemoWebPopup; 580 #elif !defined(QT_NO_COMBOBOX) 581 return new QtFallbackWebPopup; 582 #else 583 return 0; 584 #endif 585 } 586 587 #if ENABLE(WIDGETS_10_SUPPORT) 588 bool ChromeClientQt::isWindowed() 589 { 590 return m_webPage->d->viewMode == "windowed"; 591 } 592 593 bool ChromeClientQt::isFloating() 594 { 595 return m_webPage->d->viewMode == "floating"; 596 } 597 598 bool ChromeClientQt::isFullscreen() 599 { 600 return m_webPage->d->viewMode == "fullscreen"; 601 } 602 603 bool ChromeClientQt::isMaximized() 604 { 605 return m_webPage->d->viewMode == "maximized"; 606 } 607 608 bool ChromeClientQt::isMinimized() 609 { 610 return m_webPage->d->viewMode == "minimized"; 611 } 612 #endif 613 614 } -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r561 r846 35 35 #include "PlatformString.h" 36 36 37 QT_BEGIN_NAMESPACE 38 class QEventLoop; 39 QT_END_NAMESPACE 40 37 41 class QWebPage; 38 42 … … 43 47 class Page; 44 48 struct FrameLoadRequest; 49 class QtAbstractWebPopup; 45 50 46 51 class ChromeClientQt : public ChromeClient … … 63 68 virtual bool canTakeFocus(FocusDirection); 64 69 virtual void takeFocus(FocusDirection); 70 71 virtual void focusedNodeChanged(Node*); 65 72 66 73 virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&); … … 102 109 virtual IntRect windowResizerRect() const; 103 110 104 virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); 111 virtual void invalidateWindow(const IntRect&, bool); 112 virtual void invalidateContentsAndWindow(const IntRect&, bool); 113 virtual void invalidateContentsForSlowScroll(const IntRect&, bool); 105 114 virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); 115 106 116 virtual IntPoint screenToWindow(const IntPoint&) const; 107 117 virtual IntRect windowToScreen(const IntRect&) const; … … 121 131 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 122 132 #endif 133 134 #if USE(ACCELERATED_COMPOSITING) 135 // see ChromeClient.h 136 // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers 137 virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*); 138 virtual void setNeedsOneShotDrawingSynchronization(); 139 virtual void scheduleCompositingLayerSync(); 140 virtual bool allowsAcceleratedCompositing() const; 141 #endif 142 143 #if ENABLE(TILED_BACKING_STORE) 144 virtual IntRect visibleRectForTiledBackingStore() const; 145 #endif 146 147 #if ENABLE(TOUCH_EVENTS) 148 virtual void needTouchEvents(bool) { } 149 #endif 150 123 151 virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); 152 virtual void chooseIconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); 124 153 125 154 virtual void formStateDidChange(const Node*) { } … … 132 161 133 162 virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); 163 virtual void cancelGeolocationPermissionRequestForFrame(Frame*) { } 164 165 #if ENABLE(WIDGETS_10_SUPPORT) 166 virtual bool isWindowed(); 167 virtual bool isFloating(); 168 virtual bool isFullscreen(); 169 virtual bool isMaximized(); 170 virtual bool isMinimized(); 171 #endif 172 173 QtAbstractWebPopup* createSelectPopup(); 134 174 135 175 QWebPage* m_webPage; … … 141 181 bool statusBarVisible; 142 182 bool menuBarVisible; 183 QEventLoop* m_eventLoop; 143 184 }; 144 185 } -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp
r561 r846 28 28 29 29 #include "ClipboardQt.h" 30 #include "Frame.h" 31 #include "PlatformMouseEvent.h" 30 32 #include "qwebpage.h" 31 33 … … 35 37 36 38 namespace WebCore { 39 40 static inline Qt::DropActions dragOperationsToDropActions(unsigned op) 41 { 42 Qt::DropActions result = Qt::IgnoreAction; 43 if (op & DragOperationCopy) 44 result = Qt::CopyAction; 45 if (op & DragOperationMove) 46 result |= Qt::MoveAction; 47 if (op & DragOperationGeneric) 48 result |= Qt::MoveAction; 49 if (op & DragOperationLink) 50 result |= Qt::LinkAction; 51 return result; 52 } 53 54 static inline DragOperation dropActionToDragOperation(Qt::DropActions action) 55 { 56 DragOperation result = DragOperationNone; 57 if (action & Qt::CopyAction) 58 result = DragOperationCopy; 59 if (action & Qt::LinkAction) 60 result = DragOperationLink; 61 if (action & Qt::MoveAction) 62 result = DragOperationMove; 63 return result; 64 } 37 65 38 66 DragDestinationAction DragClientQt::actionMaskForDrag(DragData*) … … 59 87 } 60 88 61 void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* , bool)89 void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* frame, bool) 62 90 { 63 91 #ifndef QT_NO_DRAGANDDROP … … 67 95 if (view) { 68 96 QDrag *drag = new QDrag(view); 69 if (clipboardData ->hasImage())97 if (clipboardData && clipboardData->hasImage()) 70 98 drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData())); 99 DragOperation dragOperationMask = clipboard->sourceOperation(); 71 100 drag->setMimeData(clipboardData); 72 drag->start(); 101 Qt::DropAction actualDropAction = drag->exec(dragOperationsToDropActions(dragOperationMask)); 102 103 // Send dragEnd event 104 PlatformMouseEvent me(m_webPage->view()->mapFromGlobal(QCursor::pos()), QCursor::pos(), LeftButton, MouseEventMoved, 0, false, false, false, false, 0); 105 frame->eventHandler()->dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction)); 73 106 } 74 107 #endif -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
r561 r846 19 19 20 20 #include "config.h" 21 #include <wtf/Platform.h>22 21 #include "EditCommandQt.h" 23 22 -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
r769 r846 385 385 #endif // QT_NO_SHORTCUT 386 386 switch (kevent->windowsVirtualKeyCode()) { 387 #if QT_VERSION < 0x040500388 case VK_RETURN:389 #ifdef QT_WS_MAC390 if (kevent->shiftKey() || kevent->metaKey())391 #else392 if (kevent->shiftKey())393 #endif394 frame->editor()->command("InsertLineBreak").execute();395 else396 frame->editor()->command("InsertNewline").execute();397 break;398 #endif399 387 case VK_BACK: 400 388 frame->editor()->deleteWithDirection(SelectionController::BACKWARD, … … 408 396 if (kevent->shiftKey()) 409 397 frame->editor()->command("MoveLeftAndModifySelection").execute(); 410 else frame->editor()->command("MoveLeft").execute(); 398 else 399 frame->editor()->command("MoveLeft").execute(); 411 400 break; 412 401 case VK_RIGHT: 413 402 if (kevent->shiftKey()) 414 403 frame->editor()->command("MoveRightAndModifySelection").execute(); 415 else frame->editor()->command("MoveRight").execute(); 404 else 405 frame->editor()->command("MoveRight").execute(); 416 406 break; 417 407 case VK_UP: 418 408 if (kevent->shiftKey()) 419 409 frame->editor()->command("MoveUpAndModifySelection").execute(); 420 else frame->editor()->command("MoveUp").execute(); 410 else 411 frame->editor()->command("MoveUp").execute(); 421 412 break; 422 413 case VK_DOWN: 423 414 if (kevent->shiftKey()) 424 415 frame->editor()->command("MoveDownAndModifySelection").execute(); 425 else frame->editor()->command("MoveDown").execute(); 416 else 417 frame->editor()->command("MoveDown").execute(); 426 418 break; 427 419 case VK_PRIOR: // PageUp 428 frame->editor()->command("MovePageUp").execute(); 420 if (kevent->shiftKey()) 421 frame->editor()->command("MovePageUpAndModifySelection").execute(); 422 else 423 frame->editor()->command("MovePageUp").execute(); 429 424 break; 430 425 case VK_NEXT: // PageDown 431 frame->editor()->command("MovePageDown").execute(); 426 if (kevent->shiftKey()) 427 frame->editor()->command("MovePageDownAndModifySelection").execute(); 428 else 429 frame->editor()->command("MovePageDown").execute(); 432 430 break; 433 431 case VK_TAB: … … 602 600 if (webPageClient) { 603 601 #if QT_VERSION >= 0x040600 604 bool isPasswordField = false; 605 if (!active) { 602 // Make sure to reset input method hint 603 webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, false); 604 webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, false); 605 webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, false); 606 webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, false); 607 webPageClient->setInputMethodHint(Qt::ImhHiddenText, false); 608 609 HTMLInputElement* inputElement = 0; 610 Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame(); 611 if (frame && frame->document() && frame->document()->focusedNode()) 612 if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) 613 inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode()); 614 615 if (inputElement) { 616 // Set input method hints for "number", "tel", "email", "url" and "password" input elements. 617 webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField()); 618 webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField()); 619 webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField()); 620 webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField()); 606 621 // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag 607 622 // for password fields. The Qt platform is responsible for determining which widget 608 623 // will receive input method events for password fields. 609 Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame(); 610 if (frame && frame->document() && frame->document()->focusedNode()) { 611 if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) { 612 HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode()); 613 active = isPasswordField = inputElement->isPasswordField(); 614 } 615 } 624 bool isPasswordField = inputElement->isPasswordField(); 625 webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); 626 if (isPasswordField) 627 active = true; 616 628 } 617 webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); 629 618 630 #if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) 619 631 // disables auto-uppercase and predictive text for mobile devices -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r561 r846 2 2 * Copyright (C) 2006 Zack Rusin <zack@kde.org> 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Copyright (C) 200 8Nokia Corporation and/or its subsidiary(-ies)4 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 5 5 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 6 6 * Coypright (C) 2008 Holger Hans Peter Freyther 7 * Coypright (C) 2009, 2010 Girish Ramakrishnan <girish@forwardbias.in> 7 8 * 8 9 * All rights reserved. … … 51 52 #include "HTMLFormElement.h" 52 53 #include "HTMLPlugInElement.h" 54 #include "HTTPParsers.h" 53 55 #include "NotImplemented.h" 54 56 #include "QNetworkReplyHandler.h" 55 57 #include "ResourceHandleInternal.h" 56 58 #include "ResourceHandle.h" 59 #include "ScriptController.h" 60 #include "ScriptString.h" 57 61 #include "Settings.h" 58 #include "ScriptString.h"59 62 #include "QWebPageClient.h" 60 63 … … 70 73 #include <QCoreApplication> 71 74 #include <QDebug> 72 #if QT_VERSION >= 0x04040073 75 #include <QGraphicsScene> 74 76 #include <QGraphicsWidget> 75 77 #include <QNetworkRequest> 76 78 #include <QNetworkReply> 77 #else78 #include "qwebnetworkinterface_p.h"79 #endif80 79 #include "qwebhistory_p.h" 81 80 … … 144 143 { 145 144 145 bool FrameLoaderClientQt::deferMainResourceDataLoad = true; 146 146 147 FrameLoaderClientQt::FrameLoaderClientQt() 147 148 : m_frame(0) 148 149 , m_webFrame(0) 150 , m_firstData(false) 149 151 , m_pluginView(0) 150 152 , m_hasSentResponseToPlugin(false) 151 , m_firstData(false)152 153 , m_loadError (ResourceError()) 153 154 { … … 218 219 const QSize preferredLayoutSize = page->preferredContentsSize(); 219 220 221 ScrollbarMode hScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Horizontal); 222 ScrollbarMode vScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Vertical); 223 bool hLock = hScrollbar != ScrollbarAuto; 224 bool vLock = vScrollbar != ScrollbarAuto; 225 220 226 m_frame->createView(m_webFrame->page()->viewportSize(), 221 227 backgroundColor, !backgroundColor.alpha(), 222 228 preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(), 223 229 preferredLayoutSize.isValid(), 224 (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),225 (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));230 hScrollbar, hLock, 231 vScrollbar, vLock); 226 232 } 227 233 … … 309 315 } 310 316 317 void FrameLoaderClientQt::dispatchDidPushStateWithinPage() 318 { 319 if (dumpFrameLoaderCallbacks) 320 printf("%s - dispatchDidPushStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); 321 322 notImplemented(); 323 } 324 325 void FrameLoaderClientQt::dispatchDidReplaceStateWithinPage() 326 { 327 if (dumpFrameLoaderCallbacks) 328 printf("%s - dispatchDidReplaceStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); 329 330 notImplemented(); 331 } 332 333 void FrameLoaderClientQt::dispatchDidPopStateWithinPage() 334 { 335 if (dumpFrameLoaderCallbacks) 336 printf("%s - dispatchDidPopStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); 337 338 notImplemented(); 339 } 311 340 312 341 void FrameLoaderClientQt::dispatchWillClose() 313 342 { 314 if (dumpFrameLoaderCallbacks)315 printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));316 343 } 317 344 … … 391 418 void FrameLoaderClientQt::dispatchDidFirstLayout() 392 419 { 420 notImplemented(); 421 } 422 423 void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout() 424 { 393 425 if (m_webFrame) 394 426 emit m_webFrame->initialLayoutCompleted(); 395 }396 397 void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout()398 {399 notImplemented();400 427 } 401 428 … … 499 526 } 500 527 else { 501 m_pluginView->didFinishLoading(); 528 if (m_pluginView->isPluginView()) 529 m_pluginView->didFinishLoading(); 502 530 m_pluginView = 0; 503 531 m_hasSentResponseToPlugin = false; … … 580 608 void FrameLoaderClientQt::dispatchDidReceiveIcon() 581 609 { 582 if (dumpFrameLoaderCallbacks)583 printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));584 585 610 if (m_webFrame) { 586 611 emit m_webFrame->iconChanged(); … … 602 627 } 603 628 604 void FrameLoaderClientQt:: windowObjectCleared()605 { 606 if ( dumpFrameLoaderCallbacks)607 printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));629 void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) 630 { 631 if (world != mainThreadNormalWorld()) 632 return; 608 633 609 634 if (m_webFrame) … … 644 669 } 645 670 671 void FrameLoaderClientQt::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const 672 { 673 } 674 675 void FrameLoaderClientQt::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const 676 { 677 } 678 679 void FrameLoaderClientQt::dispatchDidChangeBackForwardIndex() const 680 { 681 } 682 646 683 void FrameLoaderClientQt::didDisplayInsecureContent() 647 684 { 685 if (dumpFrameLoaderCallbacks) 686 printf("didDisplayInsecureContent\n"); 687 648 688 notImplemented(); 649 689 } … … 651 691 void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*) 652 692 { 693 if (dumpFrameLoaderCallbacks) 694 printf("didRunInsecureContent\n"); 695 653 696 notImplemented(); 654 697 } … … 673 716 } 674 717 } else { 675 m_pluginView->didFail(error); 718 if (m_pluginView->isPluginView()) 719 m_pluginView->didFail(error); 676 720 m_pluginView = 0; 677 721 m_hasSentResponseToPlugin = false; … … 693 737 694 738 // We re-check here as the plugin can have been created 695 if (m_pluginView ) {739 if (m_pluginView && m_pluginView->isPluginView()) { 696 740 if (!m_hasSentResponseToPlugin) { 697 741 m_pluginView->didReceiveResponse(loader->response()); … … 772 816 { 773 817 RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData); 774 if ( substituteData.isValid()) {818 if (!deferMainResourceDataLoad || substituteData.isValid()) { 775 819 loader->setDeferMainResourceDataLoad(false); 776 820 // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures … … 779 823 double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f; 780 824 m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay); 781 } else {825 } else 782 826 m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1); 783 }784 827 return loader.release(); 785 828 } … … 787 830 void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) 788 831 { 789 #if QT_VERSION >= 0x040400790 832 if (!m_webFrame) 791 833 return; … … 796 838 QWebPage *page = m_webFrame->page(); 797 839 if (page->forwardUnsupportedContent()) 798 emit m_webFrame->page()->unsupportedContent(reply);840 emit page->unsupportedContent(reply); 799 841 else 800 842 reply->abort(); 801 843 } 802 #endif803 844 } 804 845 … … 944 985 { 945 986 // we need to call directly here 946 if (canShowMIMEType(MIMEType)) 987 const ResourceResponse& response = m_frame->loader()->activeDocumentLoader()->response(); 988 if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment) 989 callPolicyFunction(function, PolicyDownload); 990 else if (canShowMIMEType(MIMEType)) 947 991 callPolicyFunction(function, PolicyUse); 948 992 else … … 953 997 { 954 998 Q_ASSERT(m_webFrame); 955 #if QT_VERSION < 0x040400956 QWebNetworkRequest r(request);957 #else958 999 QNetworkRequest r(request.toNetworkRequest(m_webFrame)); 959 #endif960 1000 QWebPage* page = m_webFrame->page(); 961 1001 … … 978 1018 { 979 1019 Q_ASSERT(m_webFrame); 980 #if QT_VERSION < 0x040400981 QWebNetworkRequest r(request);982 #else983 1020 QNetworkRequest r(request.toNetworkRequest(m_webFrame)); 984 #endif985 1021 QWebPage*page = m_webFrame->page(); 986 1022 … … 1007 1043 void FrameLoaderClientQt::startDownload(const WebCore::ResourceRequest& request) 1008 1044 { 1009 #if QT_VERSION >= 0x0404001010 1045 if (!m_webFrame) 1011 1046 return; 1012 1047 1013 1048 emit m_webFrame->page()->downloadRequested(request.toNetworkRequest(m_webFrame)); 1014 #endif1015 1049 } 1016 1050 … … 1022 1056 1023 1057 QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name); 1024 frameData.url = url; 1058 1059 if (url.isEmpty()) 1060 frameData.url = blankURL(); 1061 else 1062 frameData.url = url; 1063 1025 1064 frameData.referrer = referrer; 1026 1065 frameData.allowsScrolling = allowsScrolling; … … 1047 1086 1048 1087 return frameData.frame.release(); 1088 } 1089 1090 void FrameLoaderClientQt::didTransferChildFrameToNewDocument() 1091 { 1092 ASSERT(m_frame->ownerElement()); 1093 1094 if (!m_webFrame) 1095 return; 1096 1097 Frame* parentFrame = m_webFrame->d->frame->tree()->parent(); 1098 ASSERT(parentFrame); 1099 1100 if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) { 1101 m_webFrame->d->setPage(parent->page()); 1102 1103 if (m_webFrame->parent() != qobject_cast<QObject*>(parent)) 1104 m_webFrame->setParent(parent); 1105 } 1049 1106 } 1050 1107 … … 1098 1155 { 1099 1156 public: 1100 QtPluginWidget(QWidget* w = 0) 1101 : Widget(w) 1102 , m_visible(false) 1103 {} 1104 1157 QtPluginWidget(QWidget* w = 0): Widget(w) {} 1105 1158 ~QtPluginWidget() 1106 1159 { … … 1134 1187 1135 1188 handleVisibility(); 1136 } 1137 1138 virtual void hide() 1139 { 1140 m_visible = false; 1141 Widget::hide(); 1189 1190 platformWidget()->update(); 1142 1191 } 1143 1192 1144 1193 virtual void show() 1145 1194 { 1146 m_visible = true; 1147 if (!platformWidget()) 1148 return; 1149 1150 handleVisibility(); 1195 Widget::show(); 1196 handleVisibility(); 1151 1197 } 1152 1198 … … 1154 1200 void handleVisibility() 1155 1201 { 1156 if (! m_visible)1202 if (!isVisible()) 1157 1203 return; 1158 1204 … … 1162 1208 platformWidget()->setVisible(!mask.isEmpty()); 1163 1209 } 1164 1165 bool m_visible;1166 1210 }; 1167 1211 … … 1263 1307 } 1264 1308 1265 #if QT_VERSION >= 0x0404001266 1309 if (!object) { 1267 1310 QWebPluginFactory* factory = m_webFrame->page()->pluginFactory(); … … 1269 1312 object = factory->create(mimeType, qurl, params, values); 1270 1313 } 1271 #endif1272 1314 1273 1315 if (object) { … … 1304 1346 delete object; 1305 1347 } else { // NPAPI Plugins 1348 Vector<String> params = paramNames; 1349 Vector<String> values = paramValues; 1350 if (mimeType == "application/x-shockwave-flash") { 1351 QWebPageClient* client = m_webFrame->page()->d->client; 1352 const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent()); 1353 #if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) 1354 size_t wmodeIndex = params.find("wmode"); 1355 if (wmodeIndex == -1) { 1356 // Disable XEmbed mode and force it to opaque mode 1357 params.append("wmode"); 1358 values.append("opaque"); 1359 } else if (!isQWebView) { 1360 // Disable transparency if client is not a QWebView 1361 values[wmodeIndex] = "opaque"; 1362 } 1363 #else 1364 if (!isQWebView) { 1365 // inject wmode=opaque when there is no client or the client is not a QWebView 1366 size_t wmodeIndex = params.find("wmode"); 1367 if (wmodeIndex == -1) { 1368 params.append("wmode"); 1369 values.append("opaque"); 1370 } else 1371 values[wmodeIndex] = "opaque"; 1372 } 1373 #endif 1374 } 1375 1306 1376 RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, 1307 param Names, paramValues, mimeType, loadManually);1377 params, values, mimeType, loadManually); 1308 1378 return pluginView; 1309 1379 } -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
r561 r846 104 104 virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate); 105 105 virtual void dispatchDidChangeLocationWithinPage(); 106 virtual void dispatchDidPushStateWithinPage(); 107 virtual void dispatchDidReplaceStateWithinPage(); 108 virtual void dispatchDidPopStateWithinPage(); 106 109 virtual void dispatchWillClose(); 107 110 virtual void dispatchDidReceiveIcon(); … … 149 152 virtual void updateGlobalHistoryRedirectLinks(); 150 153 virtual bool shouldGoToHistoryItem(HistoryItem*) const; 151 154 virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; 155 virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; 156 virtual void dispatchDidChangeBackForwardIndex() const; 152 157 virtual void didDisplayInsecureContent(); 153 158 virtual void didRunInsecureContent(SecurityOrigin*); … … 190 195 virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, 191 196 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ; 197 virtual void didTransferChildFrameToNewDocument(); 192 198 virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool); 193 199 virtual void redirectDataToPlugin(Widget* pluginWidget); … … 198 204 virtual String overrideMediaType() const; 199 205 200 virtual void windowObjectCleared();206 virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*); 201 207 virtual void documentElementAvailable(); 202 208 virtual void didPerformFirstNavigation() const; … … 205 211 206 212 QString chooseFile(const QString& oldFile); 213 214 static bool deferMainResourceDataLoad; 207 215 208 216 private: -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
r561 r846 51 51 static const QLatin1String settingStorageTypeSuffix(".type"); 52 52 53 static InspectorController::Setting variantToSetting(const QVariant& qvariant);54 static QVariant settingToVariant(const InspectorController::Setting& icSetting);53 static String variantToSetting(const QVariant& qvariant); 54 static QVariant settingToVariant(const String& value); 55 55 56 56 class InspectorClientWebPage : public QWebPage { … … 59 59 public: 60 60 InspectorClientWebPage(QObject* parent = 0) 61 : QWebPage(parent)61 : QWebPage(parent) 62 62 { 63 settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);64 63 } 65 64 … … 83 82 } 84 83 85 Page* InspectorClientQt::createPage() 84 85 void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*) 86 86 { 87 87 QWebView* inspectorView = new QWebView; 88 88 InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); 89 89 inspectorView->setPage(inspectorPage); 90 m_inspectorView.set(inspectorView); 91 92 inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html")); 90 91 QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector(); 92 // This is a known hook that allows changing the default URL for the 93 // Web inspector. This is used for SDK purposes. Please keep this hook 94 // around and don't remove it. 95 // https://bugs.webkit.org/show_bug.cgi?id=35340 96 QUrl inspectorUrl; 97 #ifndef QT_NO_PROPERTIES 98 inspectorUrl = inspector->property("_q_inspectorUrl").toUrl(); 99 #endif 100 if (!inspectorUrl.isValid()) 101 inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html"); 102 inspectorView->page()->mainFrame()->load(inspectorUrl); 93 103 m_inspectedWebPage->d->inspectorFrontend = inspectorView; 94 m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView); 95 96 return m_inspectorView->page()->d->page; 97 } 98 99 String InspectorClientQt::localizedStringsURL() 100 { 101 notImplemented(); 102 return String(); 103 } 104 105 String InspectorClientQt::hiddenPanels() 106 { 107 notImplemented(); 108 return String(); 109 } 110 111 void InspectorClientQt::showWindow() 112 { 113 updateWindowTitle(); 114 115 m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true); 116 // We don't allow the inspector to ask for widget visibility itself because showWindow is 117 // not always called when we want. 118 // Inspecting an element or calling QWebInspector::show() should already have made the 119 // widget visible. 120 } 121 122 void InspectorClientQt::closeWindow() 123 { 124 if (m_inspectedWebPage->d->inspector) 125 m_inspectedWebPage->d->inspector->close(); 126 } 127 128 void InspectorClientQt::attachWindow() 129 { 130 notImplemented(); 131 } 132 133 void InspectorClientQt::detachWindow() 134 { 135 notImplemented(); 136 } 137 138 void InspectorClientQt::setAttachedWindowHeight(unsigned) 139 { 140 notImplemented(); 104 inspector->d->setFrontend(inspectorView); 105 106 inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView)); 141 107 } 142 108 … … 151 117 } 152 118 153 void InspectorClientQt::inspectedURLChanged(const String& newURL) 154 { 155 m_inspectedURL = newURL; 156 updateWindowTitle(); 157 } 158 159 void InspectorClientQt::inspectorWindowObjectCleared() 160 { 161 notImplemented(); 162 } 163 164 void InspectorClientQt::updateWindowTitle() 165 { 166 if (m_inspectedWebPage->d->inspector) { 167 QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); 168 m_inspectedWebPage->d->inspector->setWindowTitle(caption); 169 } 170 } 171 172 void InspectorClientQt::populateSetting(const String& key, InspectorController::Setting& setting) 173 { 119 void InspectorClientQt::populateSetting(const String& key, String* setting) 120 { 121 #ifdef QT_NO_SETTINGS 122 Q_UNUSED(key) 123 Q_UNUSED(setting) 124 qWarning("QWebInspector: QSettings is not supported by Qt."); 125 #else 174 126 QSettings qsettings; 175 127 if (qsettings.status() == QSettings::AccessError) { … … 180 132 } 181 133 182 QString settingKey(settingStoragePrefix + key);134 QString settingKey(settingStoragePrefix + QString(key)); 183 135 QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString(); 184 136 QVariant storedValue = qsettings.value(settingKey); 185 137 storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data())); 186 setting = variantToSetting(storedValue); 187 } 188 189 void InspectorClientQt::storeSetting(const String& key, const InspectorController::Setting& setting) 190 { 138 *setting = variantToSetting(storedValue); 139 #endif // QT_NO_SETTINGS 140 } 141 142 void InspectorClientQt::storeSetting(const String& key, const String& setting) 143 { 144 #ifdef QT_NO_SETTINGS 145 Q_UNUSED(key) 146 Q_UNUSED(setting) 147 qWarning("QWebInspector: QSettings is not supported by Qt."); 148 #else 191 149 QSettings qsettings; 192 150 if (qsettings.status() == QSettings::AccessError) { … … 197 155 198 156 QVariant valueToStore = settingToVariant(setting); 199 QString settingKey(settingStoragePrefix + key);157 QString settingKey(settingStoragePrefix + QString(key)); 200 158 qsettings.setValue(settingKey, valueToStore); 201 159 qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type())); 202 } 203 204 void InspectorClientQt::removeSetting(const String&) 205 { 206 notImplemented(); 207 } 208 209 static InspectorController::Setting variantToSetting(const QVariant& qvariant) 210 { 211 InspectorController::Setting retVal; 160 #endif // QT_NO_SETTINGS 161 } 162 163 static String variantToSetting(const QVariant& qvariant) 164 { 165 String retVal; 212 166 213 167 switch (qvariant.type()) { 214 168 case QVariant::Bool: 215 retVal.set(qvariant.toBool()); 169 retVal = qvariant.toBool() ? "true" : "false"; 170 case QVariant::String: 171 retVal = qvariant.toString(); 172 default: 216 173 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 174 } 236 175 … … 238 177 } 239 178 240 static QVariant settingToVariant(const InspectorController::Setting& icSetting)179 static QVariant settingToVariant(const String& setting) 241 180 { 242 181 QVariant retVal; 243 244 switch (icSetting.type()) { 245 case InspectorController::Setting::StringType: 246 retVal.setValue(static_cast<QString>(icSetting.string())); 247 break; 248 case InspectorController::Setting::StringVectorType: { 249 const Vector<String>& vector = icSetting.stringVector(); 250 Vector<String>::const_iterator iter; 251 QStringList qsList; 252 for (iter = vector.begin(); iter != vector.end(); ++iter) 253 qsList << *iter; 254 retVal.setValue(qsList); 255 break; 256 } 257 case InspectorController::Setting::DoubleType: 258 retVal.setValue(icSetting.doubleValue()); 259 break; 260 case InspectorController::Setting::IntegerType: 261 retVal.setValue((int)icSetting.integerValue()); 262 break; 263 case InspectorController::Setting::BooleanType: 264 retVal.setValue(icSetting.booleanValue()); 265 break; 266 } 267 182 retVal.setValue(static_cast<QString>(setting)); 268 183 return retVal; 269 184 } 270 185 186 InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView) 187 : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page) 188 , m_inspectedWebPage(inspectedWebPage) 189 , m_inspectorView(inspectorView) 190 , m_destroyingInspectorView(false) 191 { 192 } 193 194 void InspectorFrontendClientQt::frontendLoaded() 195 { 196 InspectorFrontendClientLocal::frontendLoaded(); 197 setAttachedWindow(true); 198 } 199 200 String InspectorFrontendClientQt::localizedStringsURL() 201 { 202 notImplemented(); 203 return String(); 204 } 205 206 String InspectorFrontendClientQt::hiddenPanels() 207 { 208 notImplemented(); 209 return String(); 210 } 211 212 void InspectorFrontendClientQt::bringToFront() 213 { 214 updateWindowTitle(); 215 } 216 217 void InspectorFrontendClientQt::closeWindow() 218 { 219 if (m_destroyingInspectorView) 220 return; 221 m_destroyingInspectorView = true; 222 223 // Clear reference from QWebInspector to the frontend view. 224 m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0); 225 #if ENABLE(INSPECTOR) 226 m_inspectedWebPage->d->inspectorController()->disconnectFrontend(); 227 #endif 228 // Clear pointer before deleting WebView to avoid recursive calls to its destructor. 229 delete m_inspectorView.release(); 230 } 231 232 void InspectorFrontendClientQt::attachWindow() 233 { 234 notImplemented(); 235 } 236 237 void InspectorFrontendClientQt::detachWindow() 238 { 239 notImplemented(); 240 } 241 242 void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned) 243 { 244 notImplemented(); 245 } 246 247 void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL) 248 { 249 m_inspectedURL = newURL; 250 updateWindowTitle(); 251 } 252 253 void InspectorFrontendClientQt::updateWindowTitle() 254 { 255 if (m_inspectedWebPage->d->inspector) { 256 QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); 257 m_inspectedWebPage->d->inspector->setWindowTitle(caption); 258 } 259 } 260 271 261 } 272 262 -
trunk/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h
r561 r846 32 32 33 33 #include "InspectorClient.h" 34 #include "InspectorFrontendClientLocal.h" 34 35 #include "OwnPtr.h" 36 #include "PassOwnPtr.h" 35 37 #include <QtCore/QString> 36 38 … … 39 41 40 42 namespace WebCore { 41 42 43 43 class Node; 44 class Page; 45 class String; 44 46 45 46 47 47 class InspectorClientQt : public InspectorClient { 48 public: 49 InspectorClientQt(QWebPage*); 48 50 49 51 virtual void inspectorDestroyed(); 50 52 51 virtual Page* createPage();53 virtual void openInspectorFrontend(WebCore::InspectorController*); 52 54 53 virtual String localizedStringsURL(); 55 virtual void highlight(Node*); 56 virtual void hideHighlight(); 54 57 55 virtual String hiddenPanels(); 58 virtual void populateSetting(const String& key, String* value); 59 virtual void storeSetting(const String& key, const String& value); 56 60 57 virtual void showWindow(); 58 virtual void closeWindow(); 61 private: 62 QWebPage* m_inspectedWebPage; 63 }; 59 64 60 virtual void attachWindow(); 61 virtual void detachWindow(); 65 class InspectorFrontendClientQt : public InspectorFrontendClientLocal { 66 public: 67 InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView); 62 68 63 virtual void setAttachedWindowHeight(unsigned height);69 virtual void frontendLoaded(); 64 70 65 virtual void highlight(Node*); 66 virtual void hideHighlight(); 67 virtual void inspectedURLChanged(const String& newURL); 71 virtual String localizedStringsURL(); 68 72 69 virtual void populateSetting(const String& key, InspectorController::Setting&); 70 virtual void storeSetting(const String& key, const InspectorController::Setting&); 71 virtual void removeSetting(const String& key); 73 virtual String hiddenPanels(); 72 74 73 virtual void inspectorWindowObjectCleared(); 75 virtual void bringToFront(); 76 virtual void closeWindow(); 74 77 75 private: 76 void updateWindowTitle(); 77 QWebPage* m_inspectedWebPage; 78 OwnPtr<QWebView> m_inspectorView; 79 QString m_inspectedURL; 80 }; 78 virtual void attachWindow(); 79 virtual void detachWindow(); 80 81 virtual void setAttachedWindowHeight(unsigned height); 82 83 virtual void inspectedURLChanged(const String& newURL); 84 85 private: 86 void updateWindowTitle(); 87 QWebPage* m_inspectedWebPage; 88 OwnPtr<QWebView> m_inspectorView; 89 QString m_inspectedURL; 90 bool m_destroyingInspectorView; 91 }; 81 92 } 82 93 -
trunk/src/3rdparty/webkit/WebKit/qt/docs/docs.pri
r561 r846 4 4 QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/bin/qdoc3 5 5 } else { 6 QDOC = $$(QTDIR)\ bin\qdoc3.exe6 QDOC = $$(QTDIR)\\bin\\qdoc3.exe 7 7 } 8 8 -
trunk/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
r561 r846 1 1 /*! 2 2 \module QtWebKit 3 \title QtWebKit Module3 \title WebKit in Qt 4 4 \contentspage All Qt Modules 5 5 \previouspage QtSvg 6 6 \nextpage QtXml 7 7 \ingroup modules 8 \ingroup technology-apis 9 8 10 \brief The QtWebKit module provides a web browser engine as well as 9 11 classes to render and interact with web content. 12 13 QtWebKit provides a Web browser engine that makes it easy to embed content 14 from the World Wide Web into your Qt application. At the same time Web 15 content can be enhanced with native controls. 16 17 QtWebKit provides facilities for rendering of HyperText Markup Language 18 (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector 19 Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and 20 scripted with JavaScript. 21 22 A bridge between the JavaScript execution environment and the Qt object 23 model makes it possible for custom QObjects to be scripted. For detailed 24 documentation see \l{The QtWebkit Bridge}. 25 Integration with the Qt networking module enables Web pages to be transparently loaded 26 from Web servers, the local file system or even the Qt resource system. 27 28 In addition to providing pure rendering features, HTML documents can be 29 made fully editable to the user through the use of the \c{contenteditable} 30 attribute on HTML elements. 31 32 QtWebKit is based on the Open Source WebKit engine. More information about 33 WebKit itself can be found on the \l{WebKit Open Source Project} Web site. 34 35 \section1 Including In Your Project 10 36 11 37 To include the definitions of the module's classes, use the … … 19 45 \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0 20 46 21 \section1 License Information 22 23 This is a snapshot of the Qt port of WebKit. The exact version information 24 can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt. 25 26 Qt Commercial Edition licensees that wish to distribute applications that 27 use the QtWebKit module need to be aware of their obligations under the 28 GNU Library General Public License (LGPL). 29 30 Developers using the Open Source Edition can choose to redistribute 31 the module under the appropriate version of the GNU LGPL. 32 33 \legalese 34 WebKit is licensed under the GNU Library General Public License. 35 Individual contributor names and copyright dates can be found 36 inline in the code. 37 38 This library is free software; you can redistribute it and/or 39 modify it under the terms of the GNU Library General Public 40 License as published by the Free Software Foundation; either 41 version 2 of the License, or (at your option) any later version. 42 43 This library is distributed in the hope that it will be useful, 44 but WITHOUT ANY WARRANTY; without even the implied warranty of 45 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 46 Library General Public License for more details. 47 48 You should have received a copy of the GNU Library General Public License 49 along with this library; see the file COPYING.LIB. If not, write to 50 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 51 Boston, MA 02110-1301, USA. 52 \endlegalese 53 */ 54 55 /*! 56 \page webintegration.html 57 \title Integrating Web Content with QtWebKit 58 \since 4.4 59 60 \ingroup frameworks-technologies 61 62 \keyword Browser 63 \keyword Web Browser 64 65 QtWebKit provides a Web browser engine that makes it easy to embed content 66 from the World Wide Web into your Qt application. At the same time Web 67 content can be enhanced with native controls. 68 69 QtWebKit provides facilities for rendering of HyperText Markup Language 70 (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector 71 Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and 72 scripted with JavaScript. 73 74 A bridge between the JavaScript execution environment and the Qt object 75 model makes it possible for custom QObjects to be scripted. Integration 76 with the Qt networking module enables Web pages to be transparently loaded 77 from Web servers, the local file system or even the Qt resource system. 78 79 In addition to providing pure rendering features, HTML documents can be 80 made fully editable to the user through the use of the \c{contenteditable} 81 attribute on HTML elements. 82 83 QtWebKit is based on the Open Source WebKit engine. More information about 84 WebKit itself can be found on the \l{WebKit Open Source Project} Web site. 85 86 The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the 87 \l{Open Source Versions of Qt}. 47 \section1 Notes 88 48 89 49 \note Building the QtWebKit module with debugging symbols is problematic … … 100 60 Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements} 101 61 document for more information. 102 103 Topics:104 105 \tableofcontents106 62 107 63 \section1 Architecture … … 197 153 \endlist 198 154 \endtable 155 156 157 \section1 License Information 158 159 This is a snapshot of the Qt port of WebKit. The exact version information 160 can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt. 161 162 Qt Commercial Edition licensees that wish to distribute applications that 163 use the QtWebKit module need to be aware of their obligations under the 164 GNU Library General Public License (LGPL). 165 166 Developers using the Open Source Edition can choose to redistribute 167 the module under the appropriate version of the GNU LGPL. 168 169 \legalese 170 WebKit is licensed under the GNU Library General Public License. 171 Individual contributor names and copyright dates can be found 172 inline in the code. 173 174 This library is free software; you can redistribute it and/or 175 modify it under the terms of the GNU Library General Public 176 License as published by the Free Software Foundation; either 177 version 2 of the License, or (at your option) any later version. 178 179 This library is distributed in the hope that it will be useful, 180 but WITHOUT ANY WARRANTY; without even the implied warranty of 181 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 182 Library General Public License for more details. 183 184 You should have received a copy of the GNU Library General Public License 185 along with this library; see the file COPYING.LIB. If not, write to 186 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 187 Boston, MA 02110-1301, USA. 188 \endlegalese 199 189 */ 190 -
trunk/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf
r561 r846 4 4 description = "Qt WebKit API Documentation" 5 5 6 headerdirs = $SRCDIR/WebKit/qt/Api 7 sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs 6 headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative 7 sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative 8 8 outputdir = $OUTPUT_DIR/doc/html 9 9 outputformats = HTML -
trunk/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp
r561 r846 10 10 QWebInspector *inspector = new QWebInspector; 11 11 inspector->setPage(page); 12 13 connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show()));14 12 //! [0] 15 13 -
trunk/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
r561 r846 37 37 } 38 38 39 static void findButtonAndClick() 40 { 41 42 frame->setHtml("<form name=\"myform\" action=\"submit_form.asp\" method=\"get\">" 43 "<input type=\"text\" name=\"myfield\">" 44 "<input type=\"submit\" value=\"Submit\">" 45 "</form>"); 46 47 //! [Calling a DOM element method] 48 49 QWebElement document = frame->documentElement(); 50 /* Assume that the document has the following structure: 51 52 <form name="myform" action="submit_form.asp" method="get"> 53 <input type="text" name="myfield"> 54 <input type="submit" value="Submit"> 55 </form> 56 57 */ 58 59 QWebElement button = document.findFirst("input[type=submit]"); 60 button.evaluateJavaScript("click()"); 61 62 //! [Calling a DOM element method] 63 64 } 65 66 static void autocomplete1() 67 { 68 QWebElement document = frame->documentElement(); 69 70 //! [autocomplete1] 71 QWebElement firstTextInput = document.findFirst("input[type=text]"); 72 QString storedText = firstTextInput.attribute("value"); 73 //! [autocomplete1] 74 75 } 76 77 78 static void autocomplete2() 79 { 80 81 QWebElement document = frame->documentElement(); 82 QString storedText = "text"; 83 84 //! [autocomplete2] 85 QWebElement firstTextInput = document.findFirst("input[type=text]"); 86 textInput.setAttribute("value", storedText); 87 //! [autocomplete2] 88 89 } 90 91 39 92 static void findAll() 40 93 { … … 54 107 55 108 //! [FindAll intro] 56 Q List<QWebElement>allSpans = document.findAll("span");57 Q List<QWebElement>introSpans = document.findAll("p.intro span");109 QWebElementCollection allSpans = document.findAll("span"); 110 QWebElementCollection introSpans = document.findAll("p.intro span"); 58 111 //! [FindAll intro] //! [FindAll] 59 112 } … … 66 119 traverse(); 67 120 findAll(); 121 findButtonAndClick(); 122 autocomplete1(); 123 autocomplete2(); 68 124 return 0; 69 125 } -
trunk/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
r769 r846 625 625 ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *) 626 626 ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ABSENT ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int) 627 ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ABSENT; void QWebInspector::closeEvent(class QCloseEvent *)627 ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ; void QWebInspector::closeEvent(class QCloseEvent *) 628 628 ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ABSENT ; class QUrl QWebSettings::inspectorUrl(void) const 629 ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ABSENT; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const630 ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ABSENT; void QWebFrame::pageChanged(void)631 ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ABSENT; void qt_drt_enableCaretBrowsing(class QWebPage *, bool)632 ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ABSENT; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &)633 ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ABSENT; bool qt_drt_hasDocumentElement(class QWebFrame *)634 ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ABSENT; int qt_drt_numberOfPages(class QWebFrame *, float, float)635 ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ABSENT; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float)636 ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ABSENT; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &)637 ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ABSENT; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &)638 ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ABSENT; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool)639 ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ABSENT; void qt_drt_setMediaType(class QWebFrame *, class QString const &)640 ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ABSENT; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool)641 ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ABSENT; void qt_drt_webinspector_close(class QWebPage *)642 ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ABSENT; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)643 ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ABSENT; void qt_drt_webinspector_show(class QWebPage *)644 ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ABSENT; int qt_drt_workerThreadCount(void)629 ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const 630 ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ; void QWebFrame::pageChanged(void) 631 ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool) 632 ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &) 633 ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ; bool qt_drt_hasDocumentElement(class QWebFrame *) 634 ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ; int qt_drt_numberOfPages(class QWebFrame *, float, float) 635 ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float) 636 ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &) 637 ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &) 638 ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool) 639 ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ; void qt_drt_setMediaType(class QWebFrame *, class QString const &) 640 ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool) 641 ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ; void qt_drt_webinspector_close(class QWebPage *) 642 ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &) 643 ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *) 644 ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void) 645 645 ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ABSENT ; void qt_wrt_setViewMode(class QWebPage *, class QString const &) 646 646 ?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &) 647 ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ABSENT; bool QGraphicsWebView::resizesToContents(void) const648 ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ABSENT; void QWebFrame::scrollToAnchor(class QString const &)647 ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const 648 ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &) 649 649 ?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ABSENT ; void QWebSettings::setInspectorUrl(class QUrl const &) 650 ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ABSENT; void QGraphicsWebView::setResizesToContents(bool)651 ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ABSENT; void QGraphicsWebView::setTiledBackingStoreFrozen(bool)652 ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ABSENT; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&)650 ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool) 651 ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool) 652 ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&) 653 653 -
trunk/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
r769 r846 697 697 _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 696 NONAME 698 698 _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT 699 _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME ABSENT700 _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME ABSENT701 _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME ABSENT702 _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME ABSENT703 _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME ABSENT704 _Z24qt_drt_workerThreadCountv @ 703 NONAME ABSENT705 _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME ABSENT706 _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME ABSENT707 _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME ABSENT708 _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME ABSENT709 _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME ABSENT710 _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME ABSENT711 _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME ABSENT712 _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME ABSENT713 _ZN9QWebFrame11pageChangedEv @ 712 NONAME ABSENT714 _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME ABSENT699 _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME 700 _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME 701 _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME 702 _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME 703 _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME 704 _Z24qt_drt_workerThreadCountv @ 703 NONAME 705 _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME 706 _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME 707 _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME 708 _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME 709 _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME 710 _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME 711 _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME 712 _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME 713 _ZN9QWebFrame11pageChangedEv @ 712 NONAME 714 _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME 715 715 _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT 716 _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME ABSENT717 _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME ABSENT718 _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME ABSENT716 _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME 717 _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME 718 _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME 719 719 _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT 720 _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME ABSENT721 _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME ABSENT720 _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME 721 _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME 722 722 _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT 723 723 _ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME ABSENT -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qgraphicswebview 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qgraphicswebview.cpp 5 QT += testlib network 6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 7 8 symbian { 9 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 10 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
r561 r846 18 18 */ 19 19 20 #include "../util.h" 20 21 #include <QtTest/QtTest> 21 22 #include <QGraphicsSceneMouseEvent> 22 23 #include <QGraphicsView> 23 24 #include <qgraphicswebview.h> … … 25 26 #include <qwebframe.h> 26 27 27 /**28 * Starts an event loop that runs until the given signal is received.29 * Optionally the event loop30 * can return earlier on a timeout.31 *32 * \return \p true if the requested signal was received33 * \p false on timeout34 */35 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)36 {37 QEventLoop loop;38 QObject::connect(obj, signal, &loop, SLOT(quit()));39 QTimer timer;40 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));41 if (timeout > 0) {42 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));43 timer.setSingleShot(true);44 timer.start(timeout);45 }46 loop.exec();47 return timeoutSpy.isEmpty();48 }49 50 28 class tst_QGraphicsWebView : public QObject 51 29 { … … 55 33 void qgraphicswebview(); 56 34 void crashOnViewlessWebPages(); 35 void microFocusCoordinates(); 36 void focusInputTypes(); 37 void crashOnSetScaleBeforeSetUrl(); 57 38 }; 58 39 … … 98 79 }; 99 80 81 class GraphicsWebView : public QGraphicsWebView 82 { 83 Q_OBJECT 84 85 public: 86 GraphicsWebView(QGraphicsItem* parent = 0): QGraphicsWebView(parent) 87 { 88 } 89 90 void fireMouseClick(QPointF point) { 91 QGraphicsSceneMouseEvent presEv(QEvent::GraphicsSceneMousePress); 92 presEv.setPos(point); 93 presEv.setButton(Qt::LeftButton); 94 presEv.setButtons(Qt::LeftButton); 95 QGraphicsSceneMouseEvent relEv(QEvent::GraphicsSceneMouseRelease); 96 relEv.setPos(point); 97 relEv.setButton(Qt::LeftButton); 98 relEv.setButtons(Qt::LeftButton); 99 QGraphicsWebView::sceneEvent(&presEv); 100 QGraphicsWebView::sceneEvent(&relEv); 101 } 102 }; 103 100 104 void tst_QGraphicsWebView::crashOnViewlessWebPages() 101 105 { … … 107 111 webView->setPage(page); 108 112 page->webView = webView; 109 connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));110 111 113 scene.addItem(webView); 112 114 … … 114 116 view.resize(600, 480); 115 117 webView->resize(view.geometry().size()); 116 QTest::qWait(200); 118 119 QCoreApplication::processEvents(); 117 120 view.show(); 121 122 // Resizing the page will resize and layout the empty "about:blank" 123 // page, so we first connect the signal afterward. 124 connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting())); 118 125 119 126 page->mainFrame()->setHtml(QString("data:text/html," … … 123 130 "</frameset>")); 124 131 125 QVERIFY(::waitForSignal(page, SIGNAL(loadFinished(bool)))); 126 } 132 QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool)))); 133 delete page; 134 } 135 136 void tst_QGraphicsWebView::crashOnSetScaleBeforeSetUrl() 137 { 138 QGraphicsWebView* webView = new QGraphicsWebView; 139 webView->setScale(2.0); 140 delete webView; 141 } 142 143 void tst_QGraphicsWebView::microFocusCoordinates() 144 { 145 QWebPage* page = new QWebPage; 146 QGraphicsWebView* webView = new QGraphicsWebView; 147 webView->setPage( page ); 148 QGraphicsView* view = new QGraphicsView; 149 QGraphicsScene* scene = new QGraphicsScene(view); 150 view->setScene(scene); 151 scene->addItem(webView); 152 view->setGeometry(QRect(0,0,500,500)); 153 154 page->mainFrame()->setHtml("<html><body>" \ 155 "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \ 156 "<canvas id='canvas1' width='500' height='500'/>" \ 157 "<input type='password'/><br>" \ 158 "<canvas id='canvas2' width='500' height='500'/>" \ 159 "</body></html>"); 160 161 page->mainFrame()->setFocus(); 162 163 QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus); 164 QVERIFY(initialMicroFocus.isValid()); 165 166 page->mainFrame()->scroll(0,300); 167 168 QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus); 169 QVERIFY(currentMicroFocus.isValid()); 170 171 QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-300)), currentMicroFocus.toRect()); 172 173 delete view; 174 } 175 176 void tst_QGraphicsWebView::focusInputTypes() 177 { 178 QWebPage* page = new QWebPage; 179 GraphicsWebView* webView = new GraphicsWebView; 180 webView->setPage( page ); 181 QGraphicsView* view = new QGraphicsView; 182 QGraphicsScene* scene = new QGraphicsScene(view); 183 view->setScene(scene); 184 scene->addItem(webView); 185 view->setGeometry(QRect(0,0,500,500)); 186 QCoreApplication::processEvents(); 187 QUrl url("qrc:///resources/input_types.html"); 188 page->mainFrame()->load(url); 189 page->mainFrame()->setFocus(); 190 191 QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool)))); 192 193 // 'text' type 194 webView->fireMouseClick(QPointF(20.0, 10.0)); 195 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN) 196 QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase); 197 QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText); 198 #else 199 QVERIFY(webView->inputMethodHints() == Qt::ImhNone); 200 #endif 201 202 // 'password' field 203 webView->fireMouseClick(QPointF(20.0, 60.0)); 204 QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText); 205 206 // 'tel' field 207 webView->fireMouseClick(QPointF(20.0, 110.0)); 208 QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly); 209 210 // 'number' field 211 webView->fireMouseClick(QPointF(20.0, 160.0)); 212 QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly); 213 214 // 'email' field 215 webView->fireMouseClick(QPointF(20.0, 210.0)); 216 QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly); 217 218 // 'url' field 219 webView->fireMouseClick(QPointF(20.0, 260.0)); 220 QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly); 221 222 delete webView; 223 delete view; 224 } 225 226 127 227 128 228 QTEST_MAIN(tst_QGraphicsWebView) -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebelement 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebelement.cpp 5 RESOURCES += qwebelement.qrc 6 QT += testlib network 7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 8 9 symbian { 10 TARGET.UID3 = 0xA000E53A 11 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 12 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
r561 r846 20 20 21 21 #include <QtTest/QtTest> 22 23 22 #include <qwebpage.h> 24 23 #include <qwidget.h> … … 26 25 #include <qwebframe.h> 27 26 #include <qwebelement.h> 27 #include <util.h> 28 28 //TESTED_CLASS= 29 29 //TESTED_FILES= 30 31 /**32 * Starts an event loop that runs until the given signal is received.33 Optionally the event loop34 * can return earlier on a timeout.35 *36 * \return \p true if the requested signal was received37 * \p false on timeout38 */39 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)40 {41 QEventLoop loop;42 QObject::connect(obj, signal, &loop, SLOT(quit()));43 QTimer timer;44 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));45 if (timeout > 0) {46 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));47 timer.setSingleShot(true);48 timer.start(timeout);49 }50 loop.exec();51 return timeoutSpy.isEmpty();52 }53 30 54 31 class tst_QWebElement : public QObject … … 577 554 578 555 // in few seconds, the CSS should be completey loaded 579 QSignalSpy spy(m_page, SIGNAL(loadFinished(bool)));580 556 m_mainFrame->setHtml(html6); 581 QTest::qWait(200);557 waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200); 582 558 583 559 p = m_mainFrame->documentElement().findAll("p").at(0); … … 597 573 // in few seconds, the style should be completey loaded 598 574 m_mainFrame->setHtml(html7); 599 QTest::qWait(200);575 waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200); 600 576 601 577 p = m_mainFrame->documentElement().findAll("p").at(0); -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebframe 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebframe.cpp 5 RESOURCES += qwebframe.qrc 6 QT += testlib network 7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 8 !symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\" 9 10 symbian { 11 TARGET.UID3 = 0xA000E53D 12 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 13 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r769 r846 39 39 #include "../util.h" 40 40 41 #if defined(Q_OS_SYMBIAN)42 # define SRCDIR ""43 #endif44 45 //TESTED_CLASS=46 //TESTED_FILES=47 48 // Task 16019249 /**50 * Starts an event loop that runs until the given signal is received.51 Optionally the event loop52 * can return earlier on a timeout.53 *54 * \return \p true if the requested signal was received55 * \p false on timeout56 */57 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)58 {59 QEventLoop loop;60 QObject::connect(obj, signal, &loop, SLOT(quit()));61 QTimer timer;62 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));63 if (timeout > 0) {64 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));65 timer.setSingleShot(true);66 timer.start(timeout);67 }68 loop.exec();69 return timeoutSpy.isEmpty();70 }71 72 /* Mostly a test for the JavaScript related parts of QWebFrame */73 74 75 41 struct CustomType { 76 42 QString string; … … 92 58 Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty) 93 59 Q_PROPERTY(QVariantList variantListProperty READ variantListProperty WRITE setVariantListProperty) 60 Q_PROPERTY(QVariantMap variantMapProperty READ variantMapProperty WRITE setVariantMapProperty) 94 61 Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty) 95 62 Q_PROPERTY(QStringList stringListProperty READ stringListProperty WRITE setStringListProperty) … … 101 68 Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) 102 69 Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType) 70 Q_PROPERTY(QWebElement webElementProperty READ webElementProperty WRITE setWebElementProperty) 71 Q_PROPERTY(QObject* objectStarProperty READ objectStarProperty WRITE setObjectStarProperty) 103 72 Q_ENUMS(Policy Strategy) 104 73 Q_FLAGS(Ability) … … 138 107 m_writeOnlyValue(789), 139 108 m_readOnlyValue(987), 140 m_qtFunctionInvoked(-1) { } 109 m_objectStar(0), 110 m_qtFunctionInvoked(-1) 111 { 112 m_variantMapValue.insert("a", QVariant(123)); 113 m_variantMapValue.insert("b", QVariant(QLatin1String("foo"))); 114 m_variantMapValue.insert("c", QVariant::fromValue<QObject*>(this)); 115 } 141 116 142 117 ~MyQObject() { } … … 163 138 } 164 139 140 QVariantMap variantMapProperty() const { 141 return m_variantMapValue; 142 } 143 void setVariantMapProperty(const QVariantMap &value) { 144 m_variantMapValue = value; 145 } 146 165 147 QString stringProperty() const { 166 148 return m_stringValue; … … 216 198 } 217 199 200 QWebElement webElementProperty() const { 201 return m_webElement; 202 } 203 204 void setWebElementProperty(const QWebElement& element) { 205 m_webElement = element; 206 } 207 218 208 CustomType propWithCustomType() const { 219 209 return m_customType; … … 222 212 m_customType = c; 223 213 } 214 215 QObject* objectStarProperty() const { 216 return m_objectStar; 217 } 218 219 void setObjectStarProperty(QObject* object) { 220 m_objectStar = object; 221 } 222 224 223 225 224 int qtFunctionInvoked() const { … … 467 466 m_qtFunctionInvoked = 35; 468 467 m_actuals << arg; 468 } 469 void myOverloadedSlot(const QWebElement &arg) { 470 m_qtFunctionInvoked = 36; 471 m_actuals << QVariant::fromValue<QWebElement>(arg); 469 472 } 470 473 … … 494 497 QVariant m_variantValue; 495 498 QVariantList m_variantListValue; 499 QVariantMap m_variantMapValue; 496 500 QString m_stringValue; 497 501 QStringList m_stringListValue; … … 502 506 int m_readOnlyValue; 503 507 QKeySequence m_shortcut; 508 QWebElement m_webElement; 504 509 CustomType m_customType; 510 QObject* m_objectStar; 505 511 int m_qtFunctionInvoked; 506 512 QVariantList m_actuals; … … 581 587 void objectDeleted(); 582 588 void typeConversion(); 589 void arrayObjectEnumerable(); 583 590 void symmetricUrl(); 584 591 void progressSignal(); … … 595 602 void ipv6HostEncoding(); 596 603 void metaData(); 604 #if !defined(Q_WS_MAEMO_5) 605 // as maemo 5 does not use QComboBoxes to implement the popups 606 // this test does not make sense for it. 597 607 void popupFocus(); 608 #endif 609 void inputFieldFocus(); 598 610 void hitTestContent(); 599 611 void jsByteArray(); … … 605 617 void render(); 606 618 void scrollPosition(); 619 void scrollToAnchor(); 620 void scrollbarsOff(); 607 621 void evaluateWillCauseRepaint(); 608 622 void qObjectWrapperWithSameIdentity(); 623 void introspectQtMethods_data(); 624 void introspectQtMethods(); 609 625 610 626 private: … … 677 693 QWebPage* m_page; 678 694 MyQObject* m_myObject; 679 QWebView* m_ popupTestView;680 int m_ popupTestPaintCount;695 QWebView* m_inputFieldsTestView; 696 int m_inputFieldTestPaintCount; 681 697 }; 682 698 683 699 tst_QWebFrame::tst_QWebFrame() 684 700 : sTrue("true"), sFalse("false"), sUndefined("undefined"), sArray("array"), sFunction("function"), sError("error"), 685 sString("string"), sObject("object"), sNumber("number"), m_ popupTestView(0), m_popupTestPaintCount(0)701 sString("string"), sObject("object"), sNumber("number"), m_inputFieldsTestView(0), m_inputFieldTestPaintCount(0) 686 702 { 687 703 } … … 693 709 bool tst_QWebFrame::eventFilter(QObject* watched, QEvent* event) 694 710 { 695 // used on the popupFocus test696 if (watched == m_ popupTestView) {711 // used on the inputFieldFocus test 712 if (watched == m_inputFieldsTestView) { 697 713 if (event->type() == QEvent::Paint) 698 m_ popupTestPaintCount++;714 m_inputFieldTestPaintCount++; 699 715 } 700 716 return QObject::eventFilter(watched, event); … … 707 723 m_myObject = new MyQObject(); 708 724 m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject); 709 QDir::setCurrent(SRCDIR);710 725 } 711 726 … … 718 733 void tst_QWebFrame::getSetStaticProperty() 719 734 { 735 m_page->mainFrame()->setHtml("<html><head><body></body></html>"); 720 736 QCOMPARE(evalJS("typeof myObject.noSuchProperty"), sUndefined); 721 737 … … 761 777 QCOMPARE(evalJS("myObject.variantListProperty[0] === 123"), sTrue); 762 778 QCOMPARE(evalJS("myObject.variantListProperty[1] === 'foo'"), sTrue); 779 780 { 781 QString type; 782 QVariant ret = evalJSV("myObject.variantMapProperty", type); 783 QCOMPARE(type, sObject); 784 QCOMPARE(ret.type(), QVariant::Map); 785 QVariantMap vm = ret.value<QVariantMap>(); 786 QCOMPARE(vm.size(), 3); 787 QCOMPARE(vm.value("a").toInt(), 123); 788 QCOMPARE(vm.value("b").toString(), QLatin1String("foo")); 789 QCOMPARE(vm.value("c").value<QObject*>(), static_cast<QObject*>(m_myObject)); 790 } 791 QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue); 792 QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue); 793 QCOMPARE(evalJS("myObject.variantMapProperty.c.variantMapProperty.b === 'foo'"), sTrue); 763 794 764 795 { … … 857 888 QCOMPARE(evalJS("typeof myObject.stringListProperty[2]"), sString); 858 889 QCOMPARE(evalJS("myObject.stringListProperty[2]"), QLatin1String("true")); 890 evalJS("myObject.webElementProperty=document.body;"); 891 QCOMPARE(evalJS("myObject.webElementProperty.tagName"), QLatin1String("BODY")); 859 892 860 893 // try to delete … … 893 926 "myObject.readOnlyProperty == 987"), sTrue); 894 927 QCOMPARE(m_myObject->readOnlyProperty(), 987); 928 929 // QObject* property 930 m_myObject->setObjectStarProperty(0); 931 QCOMPARE(m_myObject->objectStarProperty(), (QObject*)0); 932 QCOMPARE(evalJS("myObject.objectStarProperty == null"), sTrue); 933 QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject); 934 QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sFalse); 935 QCOMPARE(evalJS("String(myObject.objectStarProperty) == 'null'"), sTrue); 936 QCOMPARE(evalJS("myObject.objectStarProperty.objectStarProperty"), 937 sUndefined); 938 m_myObject->setObjectStarProperty(this); 939 QCOMPARE(evalJS("myObject.objectStarProperty != null"), sTrue); 940 QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject); 941 QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sTrue); 942 QCOMPARE(evalJS("String(myObject.objectStarProperty) != 'null'"), sTrue); 895 943 } 896 944 … … 1919 1967 QCOMPARE(m_myObject->qtFunctionInvoked(), 35); 1920 1968 */ 1969 1970 // should pick myOverloadedSlot(QRegExp) 1971 m_myObject->resetQtFunctionInvoked(); 1972 evalJS("myObject.myOverloadedSlot(document.body)"); 1973 QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=37319", Continue); 1974 QCOMPARE(m_myObject->qtFunctionInvoked(), 36); 1975 1921 1976 // should pick myOverloadedSlot(QObject*) 1922 1977 m_myObject->resetQtFunctionInvoked(); … … 2102 2157 } 2103 2158 2159 class StringListTestObject : public QObject { 2160 Q_OBJECT 2161 public Q_SLOTS: 2162 QVariant stringList() 2163 { 2164 return QStringList() << "Q" << "t"; 2165 }; 2166 }; 2167 2168 void tst_QWebFrame::arrayObjectEnumerable() 2169 { 2170 QWebPage page; 2171 QWebFrame* frame = page.mainFrame(); 2172 QObject* qobject = new StringListTestObject(); 2173 frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership); 2174 2175 const QString script("var stringArray = test.stringList();" 2176 "var result = '';" 2177 "for (var i in stringArray) {" 2178 " result += stringArray[i];" 2179 "}" 2180 "result;"); 2181 QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt")); 2182 } 2183 2104 2184 void tst_QWebFrame::symmetricUrl() 2105 2185 { … … 2245 2325 { 2246 2326 QString url = request.url().toString(); 2247 if (op == QNetworkAccessManager::GetOperation) 2327 if (op == QNetworkAccessManager::GetOperation) { 2248 2328 if (url == "qrc:/test1.html" || url == "http://abcdef.abcdef/") 2249 2329 return new FakeReply(request, this); … … 2256 2336 } 2257 2337 #endif 2338 } 2258 2339 2259 2340 return QNetworkAccessManager::createRequest(op, request, outgoingData); … … 2272 2353 2273 2354 frame->setUrl(QUrl("qrc:/test1.html")); 2274 QTest::qWait(200);2355 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2275 2356 QCOMPARE(spy.count(), 1); 2276 2357 QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html")); … … 2278 2359 2279 2360 frame->setUrl(QUrl("qrc:/non-existent.html")); 2280 QTest::qWait(200);2361 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2281 2362 QCOMPARE(spy.count(), 2); 2282 2363 QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html")); … … 2284 2365 2285 2366 frame->setUrl(QUrl("http://abcdef.abcdef")); 2286 QTest::qWait(200);2367 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2287 2368 QCOMPARE(spy.count(), 3); 2288 2369 QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/")); … … 2295 2376 QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>))); 2296 2377 frame->setUrl(QUrl("qrc:/fake-ssl-error.html")); 2297 QTest::qWait(200);2378 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2298 2379 QCOMPARE(spy2.count(), 1); 2299 2380 QCOMPARE(frame->requestedUrl(), QUrl("qrc:/fake-ssl-error.html")); … … 2353 2434 QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); 2354 2435 frame->setHtml(html); 2355 QTest::qWait(200);2436 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2356 2437 QCOMPARE(spy.count(), 1); 2357 2438 … … 2372 2453 // in few seconds, the CSS should be completey loaded 2373 2454 frame->setHtml(html2); 2374 QTest::qWait(200);2455 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2375 2456 QCOMPARE(spy.size(), 2); 2376 2457 … … 2381 2462 void tst_QWebFrame::setHtmlWithBaseURL() 2382 2463 { 2464 if (!QDir(TESTS_SOURCE_DIR).exists()) 2465 QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); 2466 2467 QDir::setCurrent(TESTS_SOURCE_DIR); 2468 2383 2469 QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>"); 2384 2470 … … 2389 2475 QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); 2390 2476 2391 frame->setHtml(html, QUrl::fromLocalFile( QDir::currentPath()));2392 QTest::qWait(200);2477 frame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); 2478 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2393 2479 QCOMPARE(spy.count(), 1); 2394 2480 … … 2497 2583 } 2498 2584 2585 #if !defined(Q_WS_MAEMO_5) 2499 2586 void tst_QWebFrame::popupFocus() 2500 2587 { … … 2520 2607 // open the popup by clicking. check if focus is on the popup 2521 2608 QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25)); 2522 QObject* webpopup = firstChildByClassName(&view, " WebCore::QWebPopup");2609 QObject* webpopup = firstChildByClassName(&view, "QComboBox"); 2523 2610 QComboBox* combo = qobject_cast<QComboBox*>(webpopup); 2611 QVERIFY(combo != 0); 2524 2612 QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup 2525 2613 … … 2527 2615 combo->hidePopup(); 2528 2616 QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView 2529 2530 // triple the flashing time, should at least blink twice already 2531 int delay = qApp->cursorFlashTime() * 3; 2617 } 2618 #endif 2619 2620 void tst_QWebFrame::inputFieldFocus() 2621 { 2622 QWebView view; 2623 view.setHtml("<html><body><input type=\"text\"></input></body></html>"); 2624 view.resize(400, 100); 2625 view.show(); 2626 view.setFocus(); 2627 QTRY_VERIFY(view.hasFocus()); 2628 2629 // double the flashing time, should at least blink once already 2630 int delay = qApp->cursorFlashTime() * 2; 2532 2631 2533 2632 // focus the lineedit and check if it blinks 2534 QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(2 00, 25));2535 m_ popupTestView = &view;2633 QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25)); 2634 m_inputFieldsTestView = &view; 2536 2635 view.installEventFilter( this ); 2537 2636 QTest::qWait(delay); 2538 QVERIFY2(m_ popupTestPaintCount >= 4,2637 QVERIFY2(m_inputFieldTestPaintCount >= 3, 2539 2638 "The input field should have a blinking caret"); 2540 2639 } … … 2680 2779 m_page->mainFrame()->setHtml(html); 2681 2780 2682 QTest::qWait(200);2781 waitForSignal(m_page->mainFrame(), SIGNAL(loadFinished(bool)), 200); 2683 2782 QCOMPARE(loadSpy.size(), 1); 2684 2783 … … 2690 2789 frame->setHtml(innerHtml); 2691 2790 2692 QTest::qWait(200);2791 waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); 2693 2792 QCOMPARE(loadSpy.size(), 2); 2694 2793 … … 2769 2868 } 2770 2869 2870 void tst_QWebFrame::scrollToAnchor() 2871 { 2872 QWebPage page; 2873 page.setViewportSize(QSize(480, 800)); 2874 QWebFrame* frame = page.mainFrame(); 2875 2876 QString html("<html><body><p style=\"margin-bottom: 1500px;\">Hello.</p>" 2877 "<p><a id=\"foo\">This</a> is an anchor</p>" 2878 "<p style=\"margin-bottom: 1500px;\"><a id=\"bar\">This</a> is another anchor</p>" 2879 "</body></html>"); 2880 frame->setHtml(html); 2881 frame->setScrollPosition(QPoint(0, 0)); 2882 QCOMPARE(frame->scrollPosition().x(), 0); 2883 QCOMPARE(frame->scrollPosition().y(), 0); 2884 2885 QWebElement fooAnchor = frame->findFirstElement("a[id=foo]"); 2886 2887 frame->scrollToAnchor("foo"); 2888 QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top()); 2889 2890 frame->scrollToAnchor("bar"); 2891 frame->scrollToAnchor("foo"); 2892 QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top()); 2893 2894 frame->scrollToAnchor("top"); 2895 QCOMPARE(frame->scrollPosition().y(), 0); 2896 2897 frame->scrollToAnchor("bar"); 2898 frame->scrollToAnchor("notexist"); 2899 QVERIFY(frame->scrollPosition().y() != 0); 2900 } 2901 2902 2903 void tst_QWebFrame::scrollbarsOff() 2904 { 2905 QWebView view; 2906 QWebFrame* mainFrame = view.page()->mainFrame(); 2907 2908 mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); 2909 mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); 2910 2911 QString html("<script>" \ 2912 " function checkScrollbar() {" \ 2913 " if (innerWidth === document.documentElement.offsetWidth)" \ 2914 " document.getElementById('span1').innerText = 'SUCCESS';" \ 2915 " else" \ 2916 " document.getElementById('span1').innerText = 'FAIL';" \ 2917 " }" \ 2918 "</script>" \ 2919 "<body>" \ 2920 " <div style='margin-top:1000px ; margin-left:1000px'>" \ 2921 " <a id='offscreen' href='a'>End</a>" \ 2922 " </div>" \ 2923 "<span id='span1'></span>" \ 2924 "</body>"); 2925 2926 2927 view.setHtml(html); 2928 ::waitForSignal(&view, SIGNAL(loadFinished(bool))); 2929 2930 mainFrame->evaluateJavaScript("checkScrollbar();"); 2931 QCOMPARE(mainFrame->documentElement().findAll("span").at(0).toPlainText(), QString("SUCCESS")); 2932 } 2933 2771 2934 void tst_QWebFrame::evaluateWillCauseRepaint() 2772 2935 { … … 2777 2940 view.show(); 2778 2941 2779 QTest::qWait(200); 2942 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 2943 QTest::qWaitForWindowShown(&view); 2944 #else 2945 QTest::qWait(2000); 2946 #endif 2780 2947 2781 2948 view.page()->mainFrame()->evaluateJavaScript( … … 2783 2950 2784 2951 ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect))); 2785 2786 QTest::qWait(2000);2787 2952 } 2788 2953 … … 2825 2990 } 2826 2991 2992 void tst_QWebFrame::introspectQtMethods_data() 2993 { 2994 QTest::addColumn<QString>("objectExpression"); 2995 QTest::addColumn<QString>("methodName"); 2996 QTest::addColumn<QStringList>("expectedPropertyNames"); 2997 2998 QTest::newRow("myObject.mySignal") 2999 << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name"); 3000 QTest::newRow("myObject.mySlot") 3001 << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name"); 3002 QTest::newRow("myObject.myInvokable") 3003 << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name"); 3004 QTest::newRow("myObject.mySignal.connect") 3005 << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name"); 3006 QTest::newRow("myObject.mySignal.disconnect") 3007 << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name"); 3008 } 3009 3010 void tst_QWebFrame::introspectQtMethods() 3011 { 3012 QFETCH(QString, objectExpression); 3013 QFETCH(QString, methodName); 3014 QFETCH(QStringList, expectedPropertyNames); 3015 3016 QString methodLookup = QString::fromLatin1("%0['%1']").arg(objectExpression).arg(methodName); 3017 QCOMPARE(evalJSV(QString::fromLatin1("Object.getOwnPropertyNames(%0).sort()").arg(methodLookup)).toStringList(), expectedPropertyNames); 3018 3019 for (int i = 0; i < expectedPropertyNames.size(); ++i) { 3020 QString name = expectedPropertyNames.at(i); 3021 QCOMPARE(evalJS(QString::fromLatin1("%0.hasOwnProperty('%1')").arg(methodLookup).arg(name)), sTrue); 3022 evalJS(QString::fromLatin1("var descriptor = Object.getOwnPropertyDescriptor(%0, '%1')").arg(methodLookup).arg(name)); 3023 QCOMPARE(evalJS("typeof descriptor"), QString::fromLatin1("object")); 3024 QCOMPARE(evalJS("descriptor.get"), sUndefined); 3025 QCOMPARE(evalJS("descriptor.set"), sUndefined); 3026 QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue); 3027 QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse); 3028 QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse); 3029 } 3030 3031 QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty()); 3032 } 3033 2827 3034 QTEST_MAIN(tst_QWebFrame) 2828 3035 #include "tst_qwebframe.moc" -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebhistory 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebhistory.cpp 5 RESOURCES += tst_qwebhistory.qrc 6 QT += testlib network 7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 8 9 symbian { 10 TARGET.UID3 = 0xA000E53B 11 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 12 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
r561 r846 38 38 void loadPage(int nr) 39 39 { 40 frame->load(QUrl("qrc:/ data/page" + QString::number(nr) + ".html"));40 frame->load(QUrl("qrc:/resources/page" + QString::number(nr) + ".html")); 41 41 waitForLoadFinished.exec(); 42 42 } -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
r561 r846 1 1 <!DOCTYPE RCC><RCC version="1.0"> 2 2 <qresource> 3 <file> data/page1.html</file>4 <file> data/page2.html</file>5 <file> data/page3.html</file>6 <file> data/page4.html</file>7 <file> data/page5.html</file>8 <file> data/page6.html</file>3 <file>resources/page1.html</file> 4 <file>resources/page2.html</file> 5 <file>resources/page3.html</file> 6 <file>resources/page4.html</file> 7 <file>resources/page5.html</file> 8 <file>resources/page6.html</file> 9 9 </qresource> 10 10 </RCC> -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebhistoryinterface 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebhistoryinterface.cpp 5 QT += testlib network 6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 7 8 symbian { 9 TARGET.UID3 = 0xA000E53C 10 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 11 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebpage 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebpage.cpp 5 RESOURCES += tst_qwebpage.qrc 6 QT += testlib network 7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 8 !symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" 9 10 symbian { 11 TARGET.UID3 = 0xA000E53E 12 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 13 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r769 r846 20 20 */ 21 21 22 22 #include "../util.h" 23 #include <QDir> 24 #include <QGraphicsWidget> 25 #include <QLineEdit> 26 #include <QLocale> 27 #include <QMenu> 28 #include <QPushButton> 29 #include <QStyle> 23 30 #include <QtTest/QtTest> 24 31 #include <QTextCharFormat> 25 32 #include <qgraphicsscene.h> 26 33 #include <qgraphicsview.h> 27 34 #include <qgraphicswebview.h> 35 #include <qnetworkrequest.h> 36 #include <qwebdatabase.h> 28 37 #include <qwebelement.h> 29 #include <qwebpage.h>30 #include <qwidget.h>31 #include <QGraphicsWidget>32 #include <qwebview.h>33 38 #include <qwebframe.h> 34 39 #include <qwebhistory.h> 35 #include <qnetworkrequest.h> 36 #include <QDebug> 37 #include <QLineEdit> 38 #include <QMenu> 40 #include <qwebpage.h> 39 41 #include <qwebsecurityorigin.h> 40 #include <qwebdatabase.h> 41 #include <QPushButton> 42 #include <QDir> 43 44 #if defined(Q_OS_SYMBIAN) 45 # define SRCDIR "" 46 #endif 47 48 // Will try to wait for the condition while allowing event processing 49 #define QTRY_COMPARE(__expr, __expected) \ 50 do { \ 51 const int __step = 50; \ 52 const int __timeout = 5000; \ 53 if ((__expr) != (__expected)) { \ 54 QTest::qWait(0); \ 55 } \ 56 for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \ 57 QTest::qWait(__step); \ 58 } \ 59 QCOMPARE(__expr, __expected); \ 60 } while(0) 61 62 //TESTED_CLASS= 63 //TESTED_FILES= 64 65 // Task 160192 66 /** 67 * Starts an event loop that runs until the given signal is received. 68 Optionally the event loop 69 * can return earlier on a timeout. 70 * 71 * \return \p true if the requested signal was received 72 * \p false on timeout 73 */ 74 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) 75 { 76 QEventLoop loop; 77 QObject::connect(obj, signal, &loop, SLOT(quit())); 78 QTimer timer; 79 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); 80 if (timeout > 0) { 81 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); 82 timer.setSingleShot(true); 83 timer.start(timeout); 84 } 85 loop.exec(); 86 return timeoutSpy.isEmpty(); 87 } 42 #include <qwebview.h> 88 43 89 44 class EventSpy : public QObject, public QList<QEvent::Type> … … 128 83 void contextMenuCrash(); 129 84 void database(); 130 void createPlugin(); 85 void createPluginWithPluginsEnabled(); 86 void createPluginWithPluginsDisabled(); 131 87 void destroyPlugin_data(); 132 88 void destroyPlugin(); … … 147 103 void inputMethods_data(); 148 104 void inputMethods(); 105 void inputMethodsTextFormat_data(); 106 void inputMethodsTextFormat(); 149 107 void defaultTextEncoding(); 150 108 void errorPageExtension(); 109 void errorPageExtensionInIFrames(); 110 void errorPageExtensionInFrameset(); 111 void userAgentApplicationName(); 112 void userAgentLocaleChange(); 113 114 void viewModes(); 151 115 152 116 void crashTests_LazyInitializationOfMainFrame(); … … 157 121 void originatingObjectInNetworkRequests(); 158 122 void testJSPrompt(); 159 123 void showModalDialog(); 124 void testStopScheduledPageRefresh(); 125 void findText(); 126 160 127 private: 161 128 QWebView* m_view; … … 253 220 void tst_QWebPage::infiniteLoopJS() 254 221 { 222 #ifdef Q_WS_MAEMO_5 223 QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll); 224 #endif 255 225 JSTestPage* newPage = new JSTestPage(m_view); 256 226 m_view->setPage(newPage); … … 271 241 QTRY_COMPARE(spyLoadFinished.count(), 1); 272 242 273 QTest::qWait(3000); 274 275 QVERIFY(spyLoadStarted.count() > 1); 276 QVERIFY(spyLoadFinished.count() > 1); 243 QTRY_VERIFY(spyLoadStarted.count() > 1); 244 QTRY_VERIFY(spyLoadFinished.count() > 1); 277 245 278 246 spyLoadFinished.clear(); … … 396 364 QVERIFY(networkManager->requestedUrls.count() >= 1); 397 365 QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png")); 366 } 367 368 void tst_QWebPage::viewModes() 369 { 370 m_view->setHtml("<body></body>"); 371 m_page->setProperty("_q_viewMode", "minimized"); 372 373 QVariant empty = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode)\")"); 374 QVERIFY(empty.type() == QVariant::Bool && empty.toBool()); 375 376 QVariant minimized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: minimized)\")"); 377 QVERIFY(minimized.type() == QVariant::Bool && minimized.toBool()); 378 379 QVariant maximized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: maximized)\")"); 380 QVERIFY(maximized.type() == QVariant::Bool && !maximized.toBool()); 398 381 } 399 382 … … 521 504 QWebDatabase::removeAllDatabases(); 522 505 QVERIFY(!origin.databases().size()); 523 QTest::qWait(1000);524 506 } 525 507 … … 564 546 }; 565 547 566 void tst_QWebPage::createPlugin()567 { 568 QSignalSpy loadSpy( m_view, SIGNAL(loadFinished(bool)));569 570 PluginPage* newPage = new PluginPage( m_view);571 m_view->setPage(newPage);572 573 // plugins not enabled by default, so the plugin shouldn't be loaded574 m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));548 static void createPlugin(QWebView *view) 549 { 550 QSignalSpy loadSpy(view, SIGNAL(loadFinished(bool))); 551 552 PluginPage* newPage = new PluginPage(view); 553 view->setPage(newPage); 554 555 // type has to be application/x-qt-plugin 556 view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>")); 575 557 QTRY_COMPARE(loadSpy.count(), 1); 576 558 QCOMPARE(newPage->calls.count(), 0); 577 559 578 m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true); 579 580 // type has to be application/x-qt-plugin 581 m_view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>")); 560 view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>")); 582 561 QTRY_COMPARE(loadSpy.count(), 2); 583 QCOMPARE(newPage->calls.count(), 0);584 585 m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));586 QTRY_COMPARE(loadSpy.count(), 3);587 562 QCOMPARE(newPage->calls.count(), 1); 588 563 { … … 615 590 QString::fromLatin1("function clicked() {\n [native code]\n}")); 616 591 617 m_view->setHtml(QString("<html><body><table>"592 view->setHtml(QString("<html><body><table>" 618 593 "<tr><object type='application/x-qt-plugin' classid='lineedit' id='myedit'/></tr>" 619 594 "<tr><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></tr>" 620 595 "</table></body></html>"), QUrl("http://foo.bar.baz")); 621 QTRY_COMPARE(loadSpy.count(), 4);596 QTRY_COMPARE(loadSpy.count(), 3); 622 597 QCOMPARE(newPage->calls.count(), 2); 623 598 { … … 651 626 QVERIFY(ci.returnValue->inherits("QPushButton")); 652 627 } 653 628 } 629 630 void tst_QWebPage::createPluginWithPluginsEnabled() 631 { 632 m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true); 633 createPlugin(m_view); 634 } 635 636 void tst_QWebPage::createPluginWithPluginsDisabled() 637 { 638 // Qt Plugins should be loaded by QtWebKit even when PluginsEnabled is 639 // false. The client decides whether a Qt plugin is enabled or not when 640 // it decides whether or not to instantiate it. 654 641 m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, false); 655 656 m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>")); 657 QTRY_COMPARE(loadSpy.count(), 5); 658 QCOMPARE(newPage->calls.count(), 0); 659 } 660 642 createPlugin(m_view); 643 } 661 644 662 645 // Standard base class for template PluginTracerPage. In tests it is used as interface. … … 1276 1259 QVERIFY(!action->isEnabled()); 1277 1260 QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool))); 1278 QUrl url = QUrl("qrc:/// frametest/index.html");1261 QUrl url = QUrl("qrc:///resources/index.html"); 1279 1262 page->mainFrame()->load(url); 1280 1263 QTRY_COMPARE(loadSpy.count(), 1); … … 1307 1290 QWebPage* webPage = webView.page(); 1308 1291 QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool))); 1309 QUrl url = QUrl("qrc:/// frametest/iframe.html");1292 QUrl url = QUrl("qrc:///resources/iframe.html"); 1310 1293 webPage->mainFrame()->load(url); 1311 1294 QTRY_COMPARE(loadSpy.count(), 1); … … 1391 1374 1392 1375 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 1393 QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); 1376 // This part of the test checks if the SIP (Software Input Panel) is triggered, 1377 // which normally happens on mobile platforms, when a user input form receives 1378 // a mouse click. 1379 int inputPanel = 0; 1380 if (viewType == "QWebView") { 1381 if (QWebView* wv = qobject_cast<QWebView*>(view)) 1382 inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel); 1383 } else if (viewType == "QGraphicsWebView") { 1384 if (QGraphicsWebView* wv = qobject_cast<QGraphicsWebView*>(view)) 1385 inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel); 1386 } 1387 1388 // For non-mobile platforms RequestSoftwareInputPanel event is not called 1389 // because there is no SIP (Software Input Panel) triggered. In the case of a 1390 // mobile platform, an input panel, e.g. virtual keyboard, is usually invoked 1391 // and the RequestSoftwareInputPanel event is called. For these two situations 1392 // this part of the test can verified as the checks below. 1393 if (inputPanel) 1394 QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); 1395 else 1396 QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); 1394 1397 #endif 1395 1398 viewEventSpy.clear(); … … 1453 1456 QCOMPARE(selectionValue, QString("eb")); 1454 1457 1458 //Cancel current composition first 1459 inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); 1460 QInputMethodEvent eventSelection2("",inputAttributes); 1461 page->event(&eventSelection2); 1462 1455 1463 //Set selection with negative length 1456 1464 inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); 1457 QInputMethodEvent eventSelection 2("",inputAttributes);1458 page->event(&eventSelection 2);1465 QInputMethodEvent eventSelection3("",inputAttributes); 1466 page->event(&eventSelection3); 1459 1467 1460 1468 //ImAnchorPosition … … 1495 1503 #endif 1496 1504 1505 { 1506 QList<QInputMethodEvent::Attribute> attributes; 1507 QInputMethodEvent event(QString(), attributes); 1508 event.setCommitString("XXX", 0, 0); 1509 page->event(&event); 1510 event.setCommitString(QString(), -2, 2); // Erase two characters. 1511 page->event(&event); 1512 event.setCommitString(QString(), -1, 1); // Erase one character. 1513 page->event(&event); 1514 variant = page->inputMethodQuery(Qt::ImSurroundingText); 1515 value = variant.value<QString>(); 1516 QCOMPARE(value, QString("QtWebKit")); 1517 } 1518 1519 // Cancel current composition first 1520 inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); 1521 QInputMethodEvent eventSelection4("", inputAttributes); 1522 page->event(&eventSelection4); 1523 1524 // START - Tests for Selection when the Editor is NOT in Composition mode 1525 1526 // LEFT to RIGHT selection 1527 // Deselect the selection by sending MouseButtonPress events 1528 // This moves the current cursor to the end of the text 1529 page->event(&evpres); 1530 page->event(&evrel); 1531 1532 //Move to the start of the line 1533 page->triggerAction(QWebPage::MoveToStartOfLine); 1534 1535 QKeyEvent keyRightEventPress(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier); 1536 QKeyEvent keyRightEventRelease(QEvent::KeyRelease, Qt::Key_Right, Qt::NoModifier); 1537 1538 //Move 2 characters RIGHT 1539 for (int j = 0; j < 2; ++j) { 1540 page->event(&keyRightEventPress); 1541 page->event(&keyRightEventRelease); 1542 } 1543 1544 //Select to the end of the line 1545 page->triggerAction(QWebPage::SelectEndOfLine); 1546 1547 //ImAnchorPosition QtWebKit 1548 variant = page->inputMethodQuery(Qt::ImAnchorPosition); 1549 anchorPosition = variant.toInt(); 1550 QCOMPARE(anchorPosition, 2); 1551 1552 //ImCursorPosition 1553 variant = page->inputMethodQuery(Qt::ImCursorPosition); 1554 cursorPosition = variant.toInt(); 1555 QCOMPARE(cursorPosition, 8); 1556 1557 //ImCurrentSelection 1558 variant = page->inputMethodQuery(Qt::ImCurrentSelection); 1559 selectionValue = variant.value<QString>(); 1560 QCOMPARE(selectionValue, QString("WebKit")); 1561 1562 //RIGHT to LEFT selection 1563 //Deselect the selection (this moves the current cursor to the end of the text) 1564 page->event(&evpres); 1565 page->event(&evrel); 1566 1567 //ImAnchorPosition 1568 variant = page->inputMethodQuery(Qt::ImAnchorPosition); 1569 anchorPosition = variant.toInt(); 1570 QCOMPARE(anchorPosition, 8); 1571 1572 //ImCursorPosition 1573 variant = page->inputMethodQuery(Qt::ImCursorPosition); 1574 cursorPosition = variant.toInt(); 1575 QCOMPARE(cursorPosition, 8); 1576 1577 //ImCurrentSelection 1578 variant = page->inputMethodQuery(Qt::ImCurrentSelection); 1579 selectionValue = variant.value<QString>(); 1580 QCOMPARE(selectionValue, QString("")); 1581 1582 QKeyEvent keyLeftEventPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier); 1583 QKeyEvent keyLeftEventRelease(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier); 1584 1585 //Move 2 characters LEFT 1586 for (int i = 0; i < 2; ++i) { 1587 page->event(&keyLeftEventPress); 1588 page->event(&keyLeftEventRelease); 1589 } 1590 1591 //Select to the start of the line 1592 page->triggerAction(QWebPage::SelectStartOfLine); 1593 1594 //ImAnchorPosition 1595 variant = page->inputMethodQuery(Qt::ImAnchorPosition); 1596 anchorPosition = variant.toInt(); 1597 QCOMPARE(anchorPosition, 6); 1598 1599 //ImCursorPosition 1600 variant = page->inputMethodQuery(Qt::ImCursorPosition); 1601 cursorPosition = variant.toInt(); 1602 QCOMPARE(cursorPosition, 0); 1603 1604 //ImCurrentSelection 1605 variant = page->inputMethodQuery(Qt::ImCurrentSelection); 1606 selectionValue = variant.value<QString>(); 1607 QCOMPARE(selectionValue, QString("QtWebK")); 1608 1609 //END - Tests for Selection when the Editor is not in Composition mode 1610 1497 1611 //ImhHiddenText 1498 1612 QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); … … 1528 1642 } 1529 1643 1644 void tst_QWebPage::inputMethodsTextFormat_data() 1645 { 1646 QTest::addColumn<QString>("string"); 1647 QTest::addColumn<int>("start"); 1648 QTest::addColumn<int>("length"); 1649 1650 QTest::newRow("") << QString("") << 0 << 0; 1651 QTest::newRow("Q") << QString("Q") << 0 << 1; 1652 QTest::newRow("Qt") << QString("Qt") << 0 << 1; 1653 QTest::newRow("Qt") << QString("Qt") << 0 << 2; 1654 QTest::newRow("Qt") << QString("Qt") << 1 << 1; 1655 QTest::newRow("Qt ") << QString("Qt ") << 0 << 1; 1656 QTest::newRow("Qt ") << QString("Qt ") << 1 << 1; 1657 QTest::newRow("Qt ") << QString("Qt ") << 2 << 1; 1658 QTest::newRow("Qt ") << QString("Qt ") << 2 << -1; 1659 QTest::newRow("Qt ") << QString("Qt ") << -2 << 3; 1660 QTest::newRow("Qt ") << QString("Qt ") << 0 << 3; 1661 QTest::newRow("Qt by") << QString("Qt by") << 0 << 1; 1662 QTest::newRow("Qt by Nokia") << QString("Qt by Nokia") << 0 << 1; 1663 } 1664 1665 1666 void tst_QWebPage::inputMethodsTextFormat() 1667 { 1668 QWebPage* page = new QWebPage; 1669 QWebView* view = new QWebView; 1670 view->setPage(page); 1671 page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); 1672 page->mainFrame()->setHtml("<html><body>" \ 1673 "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>"); 1674 page->mainFrame()->evaluateJavaScript("document.getElementById('input1').focus()"); 1675 page->mainFrame()->setFocus(); 1676 view->show(); 1677 1678 QFETCH(QString, string); 1679 QFETCH(int, start); 1680 QFETCH(int, length); 1681 1682 QList<QInputMethodEvent::Attribute> attrs; 1683 QTextCharFormat format; 1684 format.setUnderlineStyle(QTextCharFormat::SingleUnderline); 1685 format.setUnderlineColor(Qt::red); 1686 attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format)); 1687 QInputMethodEvent im(string, attrs); 1688 page->event(&im); 1689 1690 QTest::qWait(1000); 1691 1692 delete view; 1693 } 1530 1694 // import a little DRT helper function to trigger the garbage collector 1531 1695 void QWEBKIT_EXPORT qt_drt_garbageCollector_collect(); … … 1556 1720 { 1557 1721 int i = QWebSecurityOrigin::localSchemes().size(); 1722 1558 1723 QWebSecurityOrigin::removeLocalScheme("file"); 1559 1724 QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i); 1560 1725 QWebSecurityOrigin::addLocalScheme("file"); 1561 1726 QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i); 1727 1728 QWebSecurityOrigin::removeLocalScheme("qrc"); 1729 QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i - 1); 1730 QWebSecurityOrigin::addLocalScheme("qrc"); 1731 QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i); 1732 1562 1733 QString myscheme = "myscheme"; 1563 1734 QWebSecurityOrigin::addLocalScheme(myscheme); … … 1614 1785 QWebSettings::enablePersistentStorage(); 1615 1786 1616 // Give it some time to initialize - icon database needs it 1617 QTest::qWait(1000); 1618 1619 QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true); 1620 QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true); 1621 QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true); 1622 1623 QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty()); 1624 QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty()); 1625 QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty()); 1787 1788 QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true); 1789 QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true); 1790 QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true); 1791 1792 QTRY_VERIFY(!webPage.settings()->offlineStoragePath().isEmpty()); 1793 QTRY_VERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty()); 1794 QTRY_VERIFY(!webPage.settings()->iconDatabasePath().isEmpty()); 1626 1795 } 1627 1796 … … 1665 1834 virtual bool extension(Extension, const ExtensionOption* option, ExtensionReturn* output) 1666 1835 { 1667 const ErrorPageExtensionOption* info = static_cast<const ErrorPageExtensionOption*>(option);1668 1836 ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output); 1669 1837 1670 if (info->frame == mainFrame()) { 1671 errorPage->content = "data:text/html,error"; 1672 return true; 1673 } 1674 1675 return false; 1838 errorPage->content = "data:text/html,error"; 1839 return true; 1676 1840 } 1677 1841 }; … … 1684 1848 QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); 1685 1849 1686 page->mainFrame()->load(QUrl("qrc:///frametest/index.html"));1850 m_view->setUrl(QUrl("data:text/html,foo")); 1687 1851 QTRY_COMPARE(spyLoadFinished.count(), 1); 1688 1852 1689 1853 page->mainFrame()->setUrl(QUrl("http://non.existent/url")); 1690 QTest::qWait(2000);1691 1854 QTRY_COMPARE(spyLoadFinished.count(), 2); 1692 1855 QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error")); … … 1697 1860 1698 1861 page->triggerAction(QWebPage::Back); 1699 QTest::qWait(2000); 1700 QCOMPARE(page->history()->canGoBack(), false); 1701 QCOMPARE(page->history()->canGoForward(), true); 1862 QTRY_COMPARE(page->history()->canGoBack(), false); 1863 QTRY_COMPARE(page->history()->canGoForward(), true); 1702 1864 1703 1865 page->triggerAction(QWebPage::Forward); 1704 QTest::qWait(2000); 1705 QCOMPARE(page->history()->canGoBack(), true); 1706 QCOMPARE(page->history()->canGoForward(), false); 1866 QTRY_COMPARE(page->history()->canGoBack(), true); 1867 QTRY_COMPARE(page->history()->canGoForward(), false); 1707 1868 1708 1869 page->triggerAction(QWebPage::Back); 1709 QTest::qWait(2000); 1710 QCOMPARE(page->history()->canGoBack(), false); 1711 QCOMPARE(page->history()->canGoForward(), true); 1712 QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html")); 1870 QTRY_COMPARE(page->history()->canGoBack(), false); 1871 QTRY_COMPARE(page->history()->canGoForward(), true); 1872 QTRY_COMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo")); 1713 1873 1714 1874 m_view->setPage(0); 1875 } 1876 1877 void tst_QWebPage::errorPageExtensionInIFrames() 1878 { 1879 ErrorPage* page = new ErrorPage; 1880 m_view->setPage(page); 1881 1882 m_view->setHtml(QString("data:text/html," 1883 "<h1>h1</h1>" 1884 "<iframe src='data:text/html,<p/>p'></iframe>" 1885 "<iframe src='non-existent.html'></iframe>")); 1886 QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); 1887 QTRY_COMPARE(spyLoadFinished.count(), 1); 1888 1889 QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error")); 1890 1891 m_view->setPage(0); 1892 } 1893 1894 void tst_QWebPage::errorPageExtensionInFrameset() 1895 { 1896 ErrorPage* page = new ErrorPage; 1897 m_view->setPage(page); 1898 1899 m_view->load(QUrl("qrc:///resources/index.html")); 1900 1901 QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); 1902 QTRY_COMPARE(spyLoadFinished.count(), 1); 1903 QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error")); 1904 1905 m_view->setPage(0); 1906 } 1907 1908 class FriendlyWebPage : public QWebPage 1909 { 1910 public: 1911 friend class tst_QWebPage; 1912 }; 1913 1914 void tst_QWebPage::userAgentApplicationName() 1915 { 1916 const QString oldApplicationName = QCoreApplication::applicationName(); 1917 FriendlyWebPage page; 1918 1919 const QString applicationNameMarker = QString::fromUtf8("StrangeName\342\210\236"); 1920 QCoreApplication::setApplicationName(applicationNameMarker); 1921 QVERIFY(page.userAgentForUrl(QUrl()).contains(applicationNameMarker)); 1922 1923 QCoreApplication::setApplicationName(oldApplicationName); 1924 } 1925 1926 void tst_QWebPage::userAgentLocaleChange() 1927 { 1928 FriendlyWebPage page; 1929 m_view->setPage(&page); 1930 1931 const QString markerString = QString::fromLatin1(" nn-NO)"); 1932 1933 if (page.userAgentForUrl(QUrl()).contains(markerString)) 1934 QSKIP("marker string already present", SkipSingle); 1935 1936 m_view->setLocale(QLocale(QString::fromLatin1("nn_NO"))); 1937 QVERIFY(page.userAgentForUrl(QUrl()).contains(markerString)); 1715 1938 } 1716 1939 … … 1755 1978 void tst_QWebPage::screenshot() 1756 1979 { 1757 QDir::setCurrent(SRCDIR); 1980 if (!QDir(TESTS_SOURCE_DIR).exists()) 1981 QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); 1982 1983 QDir::setCurrent(TESTS_SOURCE_DIR); 1758 1984 1759 1985 QFETCH(QString, html); … … 1761 1987 page->settings()->setAttribute(QWebSettings::PluginsEnabled, true); 1762 1988 QWebFrame* mainFrame = page->mainFrame(); 1763 mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath())); 1764 if (html.contains("</embed>")) { 1765 // some reasonable time for the PluginStream to feed test.swf to flash and start painting 1766 QTest::qWait(2000); 1767 } 1989 mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); 1990 ::waitForSignal(mainFrame, SIGNAL(loadFinished(bool)), 2000); 1768 1991 1769 1992 // take screenshot without a view … … 1871 2094 } 1872 2095 2096 class TestModalPage : public QWebPage 2097 { 2098 Q_OBJECT 2099 public: 2100 TestModalPage(QObject* parent = 0) : QWebPage(parent) { 2101 } 2102 virtual QWebPage* createWindow(WebWindowType) { 2103 QWebPage* page = new TestModalPage(); 2104 connect(page, SIGNAL(windowCloseRequested()), page, SLOT(deleteLater())); 2105 return page; 2106 } 2107 }; 2108 2109 void tst_QWebPage::showModalDialog() 2110 { 2111 TestModalPage page; 2112 page.mainFrame()->setHtml(QString("<html></html>")); 2113 QString res = page.mainFrame()->evaluateJavaScript("window.showModalDialog('javascript:window.returnValue=dialogArguments; window.close();', 'This is a test');").toString(); 2114 QCOMPARE(res, QString("This is a test")); 2115 } 2116 2117 void tst_QWebPage::testStopScheduledPageRefresh() 2118 { 2119 // Without QWebPage::StopScheduledPageRefresh 2120 QWebPage page1; 2121 page1.setNetworkAccessManager(new TestNetworkManager(&page1)); 2122 page1.mainFrame()->setHtml("<html><head>" 2123 "<meta http-equiv=\"refresh\"content=\"0;URL=http://qt.nokia.com/favicon.ico\">" 2124 "</head><body><h1>Page redirects immediately...</h1>" 2125 "</body></html>"); 2126 QVERIFY(::waitForSignal(&page1, SIGNAL(loadFinished(bool)))); 2127 QTest::qWait(500); 2128 QCOMPARE(page1.mainFrame()->url().toString(), QString("http://qt.nokia.com/favicon.ico")); 2129 2130 // With QWebPage::StopScheduledPageRefresh 2131 QWebPage page2; 2132 page2.setNetworkAccessManager(new TestNetworkManager(&page2)); 2133 page2.mainFrame()->setHtml("<html><head>" 2134 "<meta http-equiv=\"refresh\"content=\"1;URL=http://qt.nokia.com/favicon.ico\">" 2135 "</head><body><h1>Page redirect test with 1 sec timeout...</h1>" 2136 "</body></html>"); 2137 page2.triggerAction(QWebPage::StopScheduledPageRefresh); 2138 QTest::qWait(1500); 2139 QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank")); 2140 } 2141 2142 void tst_QWebPage::findText() 2143 { 2144 m_view->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>")); 2145 m_page->triggerAction(QWebPage::SelectAll); 2146 QVERIFY(!m_page->selectedText().isEmpty()); 2147 m_page->findText(""); 2148 QVERIFY(m_page->selectedText().isEmpty()); 2149 QStringList words = (QStringList() << "foo" << "bar"); 2150 foreach (QString subString, words) { 2151 m_page->findText(subString, QWebPage::FindWrapsAroundDocument); 2152 QCOMPARE(m_page->selectedText(), subString); 2153 m_page->findText(""); 2154 QVERIFY(m_page->selectedText().isEmpty()); 2155 } 2156 } 2157 1873 2158 QTEST_MAIN(tst_QWebPage) 1874 2159 #include "tst_qwebpage.moc" -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
r561 r846 1 1 <!DOCTYPE RCC><RCC version="1.0"> 2 2 <qresource> 3 <file> frametest/index.html</file>4 <file> frametest/frame_a.html</file>5 <file> frametest/iframe.html</file>6 <file> frametest/iframe2.html</file>7 <file> frametest/iframe3.html</file>3 <file>resources/index.html</file> 4 <file>resources/frame_a.html</file> 5 <file>resources/iframe.html</file> 6 <file>resources/iframe2.html</file> 7 <file>resources/iframe3.html</file> 8 8 </qresource> 9 9 </RCC> -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebplugindatabase 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebplugindatabase.cpp 5 QT += testlib network 6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 7 8 symbian { 9 TARGET.UID3 = 0xA000E540 10 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 11 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebview 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebview.cpp 5 QT += testlib network 6 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 7 RESOURCES += tst_qwebview.qrc 8 DEFINES += SRCDIR=\\\"$$PWD/\\\" 9 10 symbian { 11 TARGET.UID3 = 0xA000E53F 12 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 13 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
r561 r846 47 47 void reusePage_data(); 48 48 void reusePage(); 49 void microFocusCoordinates(); 50 void focusInputTypes(); 49 51 50 52 void crashTests(); 53 }; 54 55 class WebView : public QWebView 56 { 57 Q_OBJECT 58 59 public: 60 void fireMouseClick(QPoint point) { 61 QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); 62 QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); 63 QWebView::mousePressEvent(&presEv); 64 QWebView::mousePressEvent(&relEv); 65 } 66 51 67 }; 52 68 … … 122 138 void tst_QWebView::reusePage() 123 139 { 124 QDir::setCurrent(SRCDIR); 140 if (!QDir(TESTS_SOURCE_DIR).exists()) 141 QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); 142 143 QDir::setCurrent(TESTS_SOURCE_DIR); 125 144 126 145 QFETCH(QString, html); … … 130 149 page->settings()->setAttribute(QWebSettings::PluginsEnabled, true); 131 150 QWebFrame* mainFrame = page->mainFrame(); 132 mainFrame->setHtml(html, QUrl::fromLocalFile( QDir::currentPath()));151 mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); 133 152 if (html.contains("</embed>")) { 134 153 // some reasonable time for the PluginStream to feed test.swf to flash and start painting 135 QTest::qWait(2000);154 waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000); 136 155 } 137 156 138 157 view1->show(); 139 QTest::qWait(2000); 158 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 159 QTest::qWaitForWindowShown(view1); 160 #else 161 QTest::qWait(2000); 162 #endif 140 163 delete view1; 141 164 QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view … … 144 167 view2->setPage(page); 145 168 view2->show(); // in Windowless mode, you should still be able to see the plugin here 146 QTest::qWait(2000); 169 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 170 QTest::qWaitForWindowShown(view2); 171 #else 172 QTest::qWait(2000); 173 #endif 147 174 delete view2; 148 175 … … 186 213 QWebView view; 187 214 WebViewCrashTest tester(&view); 188 QUrl url("qrc:/// data/index.html");215 QUrl url("qrc:///resources/index.html"); 189 216 view.load(url); 190 217 QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed. 191 218 } 192 219 220 void tst_QWebView::microFocusCoordinates() 221 { 222 QWebPage* page = new QWebPage; 223 QWebView* webView = new QWebView; 224 webView->setPage( page ); 225 226 page->mainFrame()->setHtml("<html><body>" \ 227 "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \ 228 "<canvas id='canvas1' width='500' height='500'/>" \ 229 "<input type='password'/><br>" \ 230 "<canvas id='canvas2' width='500' height='500'/>" \ 231 "</body></html>"); 232 233 page->mainFrame()->setFocus(); 234 235 QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus); 236 QVERIFY(initialMicroFocus.isValid()); 237 238 page->mainFrame()->scroll(0,50); 239 240 QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus); 241 QVERIFY(currentMicroFocus.isValid()); 242 243 QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-50)), currentMicroFocus.toRect()); 244 } 245 246 void tst_QWebView::focusInputTypes() 247 { 248 QWebPage* page = new QWebPage; 249 WebView* webView = new WebView; 250 webView->setPage( page ); 251 252 QCoreApplication::processEvents(); 253 QUrl url("qrc:///resources/input_types.html"); 254 page->mainFrame()->load(url); 255 page->mainFrame()->setFocus(); 256 257 QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool)))); 258 259 // 'text' type 260 webView->fireMouseClick(QPoint(20, 10)); 261 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN) 262 QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase); 263 QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText); 264 #else 265 QVERIFY(webView->inputMethodHints() == Qt::ImhNone); 266 #endif 267 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 268 269 // 'password' field 270 webView->fireMouseClick(QPoint(20, 60)); 271 QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText); 272 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 273 274 // 'tel' field 275 webView->fireMouseClick(QPoint(20, 110)); 276 QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly); 277 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 278 279 // 'number' field 280 webView->fireMouseClick(QPoint(20, 160)); 281 QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly); 282 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 283 284 // 'email' field 285 webView->fireMouseClick(QPoint(20, 210)); 286 QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly); 287 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 288 289 // 'url' field 290 webView->fireMouseClick(QPoint(20, 260)); 291 QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly); 292 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 293 294 // 'password' field 295 webView->fireMouseClick(QPoint(20, 60)); 296 QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText); 297 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 298 299 // 'text' type 300 webView->fireMouseClick(QPoint(20, 10)); 301 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN) 302 QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase); 303 QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText); 304 #else 305 QVERIFY(webView->inputMethodHints() == Qt::ImhNone); 306 #endif 307 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 308 309 // 'password' field 310 webView->fireMouseClick(QPoint(20, 60)); 311 QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText); 312 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 313 314 qWarning("clicking on text area"); 315 // 'text area' field 316 webView->fireMouseClick(QPoint(20, 320)); 317 QVERIFY(webView->inputMethodHints() == Qt::ImhNone); 318 QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled)); 319 320 delete webView; 321 322 } 193 323 194 324 QTEST_MAIN(tst_QWebView) -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
r561 r846 1 1 <!DOCTYPE RCC><RCC version="1.0"> 2 2 <qresource> 3 <file>data/index.html</file> 4 <file>data/frame_a.html</file> 3 <file>resources/index.html</file> 4 <file>resources/frame_a.html</file> 5 <file>resources/input_types.html</file> 5 6 </qresource> 6 7 </RCC> -
trunk/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
r561 r846 1 1 2 2 TEMPLATE = subdirs 3 SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory 4 greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro 3 SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap 4 SUBDIRS += benchmarks/painting benchmarks/loading -
trunk/src/3rdparty/webkit/WebKit/qt/tests/util.h
r561 r846 18 18 */ 19 19 // Functions and macros that really need to be in QTestLib 20 21 #include <QEventLoop> 22 #include <QSignalSpy> 23 #include <QTimer> 24 25 #if !defined(TESTS_SOURCE_DIR) 26 #define TESTS_SOURCE_DIR "" 27 #endif 28 29 /** 30 * Starts an event loop that runs until the given signal is received. 31 * Optionally the event loop 32 * can return earlier on a timeout. 33 * 34 * \return \p true if the requested signal was received 35 * \p false on timeout 36 */ 37 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) 38 { 39 QEventLoop loop; 40 QObject::connect(obj, signal, &loop, SLOT(quit())); 41 QTimer timer; 42 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); 43 if (timeout > 0) { 44 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); 45 timer.setSingleShot(true); 46 timer.start(timeout); 47 } 48 loop.exec(); 49 return timeoutSpy.isEmpty(); 50 } 20 51 21 52 // Will try to wait for the condition while allowing event processing … … 46 77 QCOMPARE(__expr, __expected); \ 47 78 } while(0) 48
Note:
See TracChangeset
for help on using the changeset viewer.