summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.qmake.conf7
-rw-r--r--configure.json34
-rw-r--r--examples/examples.pro12
-rw-r--r--examples/webengine/customdialogs/MessageRectangle.qml55
-rw-r--r--examples/webengine/customdialogs/SwitchButton.qml60
-rw-r--r--examples/webengine/customdialogs/WebView.qml125
-rw-r--r--examples/webengine/customdialogs/customdialogs.pro18
-rw-r--r--examples/webengine/customdialogs/customdialogs.qrc24
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-auth1.pngbin0 -> 6453 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-auth2.pngbin0 -> 7983 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-color1.pngbin0 -> 20401 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-color2.pngbin0 -> 6609 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-file1.pngbin0 -> 15736 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-file2.pngbin0 -> 9036 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-menu.pngbin0 -> 5484 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-prompt1.pngbin0 -> 5509 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-prompt2.pngbin0 -> 7839 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-validation1.pngbin0 -> 12523 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs-validation2.pngbin0 -> 12171 bytes
-rw-r--r--examples/webengine/customdialogs/doc/images/customdialogs.pngbin0 -> 11764 bytes
-rw-r--r--examples/webengine/customdialogs/doc/src/customdialogs.qdoc337
-rw-r--r--examples/webengine/customdialogs/forms/Authentication.qml68
-rw-r--r--examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml161
-rw-r--r--examples/webengine/customdialogs/forms/Button.qml98
-rw-r--r--examples/webengine/customdialogs/forms/ColorCell.qml53
-rw-r--r--examples/webengine/customdialogs/forms/ColorPicker.qml68
-rw-r--r--examples/webengine/customdialogs/forms/ColorPickerForm.ui.qml225
-rw-r--r--examples/webengine/customdialogs/forms/FilePicker.qml81
-rw-r--r--examples/webengine/customdialogs/forms/FilePickerForm.ui.qml167
-rw-r--r--examples/webengine/customdialogs/forms/FileRow.qml82
-rw-r--r--examples/webengine/customdialogs/forms/JavaScript.qml81
-rw-r--r--examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml149
-rw-r--r--examples/webengine/customdialogs/forms/Menu.qml59
-rw-r--r--examples/webengine/customdialogs/forms/MenuForm.ui.qml103
-rw-r--r--examples/webengine/customdialogs/icon.svg24
-rw-r--r--examples/webengine/customdialogs/index.html53
-rw-r--r--examples/webengine/customdialogs/main.cpp75
-rw-r--r--examples/webengine/customdialogs/main.qml90
-rw-r--r--examples/webengine/customdialogs/server.cpp75
-rw-r--r--examples/webengine/customdialogs/server.h65
-rw-r--r--examples/webengine/customdialogs/style.css37
-rw-r--r--examples/webengine/quicknanobrowser/quicknanobrowser.pro2
-rw-r--r--examples/webengine/recipebrowser/doc/images/recipebrowser-demo.jpgbin0 -> 33398 bytes
-rw-r--r--examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc216
-rw-r--r--examples/webengine/recipebrowser/main.cpp66
-rw-r--r--examples/webengine/recipebrowser/recipebrowser.pro14
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md23
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md12
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/markdown.css260
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/marked.min.js6
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/custom.css65
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/custom.js57
-rw-r--r--examples/webengine/recipebrowser/resources/pages/burger.html76
-rw-r--r--examples/webengine/recipebrowser/resources/pages/cupcakes.html54
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/burger.jpgbin0 -> 48882 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/cupcakes.jpgbin0 -> 38653 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/pasta.jpgbin0 -> 42411 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/pizza.jpgbin0 -> 49068 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/skewers.jpgbin0 -> 49246 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/soup.jpgbin0 -> 49028 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/images/steak.jpgbin0 -> 49202 bytes
-rw-r--r--examples/webengine/recipebrowser/resources/pages/pasta.html57
-rw-r--r--examples/webengine/recipebrowser/resources/pages/pizza.html48
-rw-r--r--examples/webengine/recipebrowser/resources/pages/skewers.html54
-rw-r--r--examples/webengine/recipebrowser/resources/pages/soup.html42
-rw-r--r--examples/webengine/recipebrowser/resources/pages/steak.html68
-rw-r--r--examples/webengine/recipebrowser/resources/qml/RecipeList.qml162
-rw-r--r--examples/webengine/recipebrowser/resources/qml/main.qml158
-rw-r--r--examples/webengine/recipebrowser/resources/resources.qrc28
-rw-r--r--examples/webenginewidgets/demobrowser/browsermainwindow.cpp53
-rw-r--r--examples/webenginewidgets/demobrowser/browsermainwindow.h15
-rw-r--r--examples/webenginewidgets/demobrowser/webview.cpp6
-rw-r--r--examples/webenginewidgets/demobrowser/webview.h1
-rw-r--r--examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc9
-rw-r--r--examples/webenginewidgets/markdowneditor/mainwindow.cpp1
-rw-r--r--examples/webenginewidgets/spellchecker/data/icon.svg24
-rw-r--r--examples/webenginewidgets/spellchecker/data/index.html33
-rw-r--r--examples/webenginewidgets/spellchecker/data/spellchecker.qrc7
-rw-r--r--examples/webenginewidgets/spellchecker/data/style.css90
-rw-r--r--examples/webenginewidgets/spellchecker/dict/de/README.txt20
-rw-r--r--examples/webenginewidgets/spellchecker/dict/de/de-DE.aff5
-rw-r--r--examples/webenginewidgets/spellchecker/dict/de/de-DE.dic14
-rw-r--r--examples/webenginewidgets/spellchecker/dict/en/README.txt16
-rw-r--r--examples/webenginewidgets/spellchecker/dict/en/en-US.aff5
-rw-r--r--examples/webenginewidgets/spellchecker/dict/en/en-US.dic11
-rw-r--r--examples/webenginewidgets/spellchecker/doc/images/spellchecker-example.pngbin0 -> 15978 bytes
-rw-r--r--examples/webenginewidgets/spellchecker/doc/src/spellchecker.qdoc139
-rw-r--r--examples/webenginewidgets/spellchecker/main.cpp54
-rw-r--r--examples/webenginewidgets/spellchecker/spellchecker.pro63
-rw-r--r--examples/webenginewidgets/spellchecker/webview.cpp96
-rw-r--r--examples/webenginewidgets/spellchecker/webview.h60
-rw-r--r--qtwebengine.pro13
m---------src/3rdparty0
-rw-r--r--src/core/access_token_store_qt.cpp7
-rw-r--r--src/core/access_token_store_qt.h6
-rw-r--r--src/core/api/core_api.pro4
-rw-r--r--src/core/api/qtwebenginecoreglobal.cpp11
-rw-r--r--src/core/authentication_dialog_controller_p.h3
-rw-r--r--src/core/browser_accessibility_manager_qt.cpp5
-rw-r--r--src/core/browser_accessibility_manager_qt.h15
-rw-r--r--src/core/browser_accessibility_qt.cpp4
-rw-r--r--src/core/browser_context_adapter.cpp21
-rw-r--r--src/core/browser_context_adapter.h5
-rw-r--r--src/core/browser_context_adapter_client.h8
-rw-r--r--src/core/browser_context_qt.cpp90
-rw-r--r--src/core/browser_context_qt.h45
-rw-r--r--src/core/certificate_error_controller.cpp3
-rw-r--r--src/core/certificate_error_controller.h3
-rw-r--r--src/core/chrome_qt.gyp58
-rw-r--r--src/core/chromium_gpu_helper.cpp7
-rw-r--r--src/core/chromium_overrides.cpp8
-rw-r--r--src/core/common/qt_messages.h3
-rw-r--r--src/core/common/user_script_data.h3
-rw-r--r--src/core/config/common.pri9
-rw-r--r--src/core/config/desktop_linux.pri9
-rw-r--r--src/core/config/embedded_linux.pri4
-rw-r--r--src/core/config/embedded_qnx.pri1
-rw-r--r--src/core/config/linux.pri19
-rw-r--r--src/core/config/mac_osx.pri8
-rw-r--r--src/core/config/windows.pri11
-rw-r--r--src/core/content_browser_client_qt.cpp144
-rw-r--r--src/core/content_browser_client_qt.h19
-rw-r--r--src/core/content_client_qt.cpp9
-rw-r--r--src/core/content_client_qt.h1
-rw-r--r--src/core/content_main_delegate_qt.cpp19
-rw-r--r--src/core/content_main_delegate_qt.h3
-rw-r--r--src/core/cookie_monster_delegate_qt.cpp70
-rw-r--r--src/core/cookie_monster_delegate_qt.h9
-rw-r--r--src/core/core_common.pri1
-rw-r--r--src/core/core_gyp_generator.pro63
-rw-r--r--src/core/core_module.pro8
-rw-r--r--src/core/delegated_frame_node.cpp131
-rw-r--r--src/core/delegated_frame_node.h7
-rw-r--r--src/core/desktop_screen_qt.cpp31
-rw-r--r--src/core/desktop_screen_qt.h20
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.cpp17
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.h2
-rw-r--r--src/core/doc/src/qtwebenginecore-index.qdoc1
-rw-r--r--src/core/doc/src/qtwebenginecore-module.qdoc1
-rw-r--r--src/core/download_manager_delegate_qt.cpp48
-rw-r--r--src/core/download_manager_delegate_qt.h4
-rw-r--r--src/core/file_picker_controller.cpp8
-rw-r--r--src/core/file_picker_controller.h8
-rw-r--r--src/core/gl_context_qt.cpp24
-rw-r--r--src/core/gl_context_qt.h6
-rw-r--r--src/core/gl_surface_qt.cpp88
-rw-r--r--src/core/gl_surface_qt.h2
-rw-r--r--src/core/global_descriptors_qt.h10
-rw-r--r--src/core/gyp_run.pro20
-rw-r--r--src/core/javascript_dialog_manager_qt.cpp10
-rw-r--r--src/core/javascript_dialog_manager_qt.h10
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp62
-rw-r--r--src/core/media_capture_devices_dispatcher.h8
-rw-r--r--src/core/network_delegate_qt.cpp14
-rw-r--r--src/core/network_delegate_qt.h9
-rw-r--r--src/core/ozone_platform_eglfs.cpp26
-rw-r--r--src/core/ozone_platform_eglfs.h23
-rw-r--r--src/core/pdfium_printing_wrapper_qt.cpp235
-rw-r--r--src/core/pdfium_printing_wrapper_qt.h66
-rw-r--r--src/core/permission_manager_qt.cpp33
-rw-r--r--src/core/permission_manager_qt.h12
-rw-r--r--src/core/print_view_manager_base_qt.cpp5
-rw-r--r--src/core/print_view_manager_base_qt.h4
-rw-r--r--src/core/print_view_manager_qt.cpp34
-rw-r--r--src/core/print_view_manager_qt.h8
-rw-r--r--src/core/printing_message_filter_qt.cpp16
-rw-r--r--src/core/printing_message_filter_qt.h8
-rw-r--r--src/core/proxy_config_service_qt.cpp7
-rw-r--r--src/core/proxy_config_service_qt.h5
-rw-r--r--src/core/qrc_protocol_handler_qt.cpp2
-rw-r--r--src/core/qrc_protocol_handler_qt.h2
-rw-r--r--src/core/qtwebengine.gypi12
-rw-r--r--src/core/qtwebengine_extras.gypi17
-rw-r--r--src/core/render_widget_host_view_qt.cpp82
-rw-r--r--src/core/render_widget_host_view_qt.h28
-rw-r--r--src/core/render_widget_host_view_qt_delegate.h19
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp237
-rw-r--r--src/core/renderer/content_renderer_client_qt.h14
-rw-r--r--src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp401
-rw-r--r--src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h108
-rw-r--r--src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp77
-rw-r--r--src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp50
-rw-r--r--src/core/renderer/pepper/pepper_renderer_host_factory_qt.h2
-rw-r--r--src/core/renderer/render_frame_observer_qt.cpp20
-rw-r--r--src/core/renderer/render_frame_observer_qt.h12
-rw-r--r--src/core/renderer/render_view_observer_qt.cpp34
-rw-r--r--src/core/renderer/render_view_observer_qt.h7
-rw-r--r--src/core/renderer/user_resource_controller.cpp68
-rw-r--r--src/core/renderer/user_resource_controller.h19
-rw-r--r--src/core/renderer/web_channel_ipc_transport.cpp28
-rw-r--r--src/core/renderer/web_channel_ipc_transport.h13
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp (renamed from src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp)0
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h (renamed from src/core/renderer/pepper/pepper_flash_browser_host_qt.h)0
-rw-r--r--src/core/renderer_host/pepper/pepper_host_factory_qt.cpp (renamed from src/core/renderer/pepper/pepper_host_factory_qt.cpp)20
-rw-r--r--src/core/renderer_host/pepper/pepper_host_factory_qt.h (renamed from src/core/renderer/pepper/pepper_host_factory_qt.h)2
-rw-r--r--src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp (renamed from src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp)0
-rw-r--r--src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h (renamed from src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h)0
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp (renamed from src/core/resource_dispatcher_host_delegate_qt.cpp)3
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.h (renamed from src/core/resource_dispatcher_host_delegate_qt.h)8
-rw-r--r--src/core/renderer_host/user_resource_controller_host.cpp (renamed from src/core/user_resource_controller_host.cpp)0
-rw-r--r--src/core/renderer_host/user_resource_controller_host.h (renamed from src/core/user_resource_controller_host.h)0
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.cpp (renamed from src/core/web_channel_ipc_transport_host.cpp)0
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.h (renamed from src/core/web_channel_ipc_transport_host.h)2
-rw-r--r--src/core/resource_bundle_qt.cpp70
-rw-r--r--src/core/resource_context_qt.cpp3
-rw-r--r--src/core/resources/resources.gyp4
-rw-r--r--src/core/surface_factory_qt.cpp8
-rw-r--r--src/core/type_conversion.cpp2
-rw-r--r--src/core/type_conversion.h2
-rw-r--r--src/core/url_request_context_getter_qt.cpp75
-rw-r--r--src/core/url_request_context_getter_qt.h14
-rw-r--r--src/core/user_script.cpp105
-rw-r--r--src/core/user_script.h3
-rw-r--r--src/core/web_contents_adapter.cpp155
-rw-r--r--src/core/web_contents_adapter.h14
-rw-r--r--src/core/web_contents_adapter_client.h167
-rw-r--r--src/core/web_contents_adapter_p.h11
-rw-r--r--src/core/web_contents_delegate_qt.cpp13
-rw-r--r--src/core/web_contents_delegate_qt.h25
-rw-r--r--src/core/web_contents_view_qt.cpp26
-rw-r--r--src/core/web_engine_context.cpp31
-rw-r--r--src/core/web_engine_context.h18
-rw-r--r--src/core/web_engine_library_info.cpp82
-rw-r--r--src/core/web_engine_settings.cpp3
-rw-r--r--src/core/web_engine_settings.h2
-rw-r--r--src/core/web_engine_visited_links_manager.cpp1
-rw-r--r--src/core/web_event_factory.cpp556
-rw-r--r--src/core/yuv_video_node.cpp31
-rw-r--r--src/core/yuv_video_node.h9
-rw-r--r--src/process/process.pro6
-rw-r--r--src/src.pro13
-rw-r--r--src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro8
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror.cpp7
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror_p.h1
-rw-r--r--src/webengine/api/qquickwebenginecontextmenudata.cpp209
-rw-r--r--src/webengine/api/qquickwebenginecontextmenurequest.cpp274
-rw-r--r--src/webengine/api/qquickwebenginecontextmenurequest_p.h (renamed from src/webengine/api/qquickwebenginecontextmenudata_p.h)75
-rw-r--r--src/webengine/api/qquickwebenginedialogrequests.cpp856
-rw-r--r--src/webengine/api/qquickwebenginedialogrequests_p.h265
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp27
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p.h11
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h1
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp104
-rw-r--r--src/webengine/api/qquickwebengineprofile.h9
-rw-r--r--src/webengine/api/qquickwebenginescript.cpp5
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp68
-rw-r--r--src/webengine/api/qquickwebenginesettings_p.h12
-rw-r--r--src/webengine/api/qquickwebengineview.cpp349
-rw-r--r--src/webengine/api/qquickwebengineview_p.h25
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h64
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf2
-rw-r--r--src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc8
-rw-r--r--src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml10
-rw-r--r--src/webengine/doc/src/external-resources.qdoc25
-rw-r--r--src/webengine/doc/src/qtwebengine-3rdparty.qdoc15371
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc109
-rw-r--r--src/webengine/doc/src/qtwebengine-index.qdoc1
-rw-r--r--src/webengine/doc/src/qtwebengine-module.qdoc44
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc11
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc8
-rw-r--r--src/webengine/doc/src/qtwebengine-qmlmodule.qdoc4
-rw-r--r--src/webengine/doc/src/qwebengine-licensing.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc96
-rw-r--r--src/webengine/plugin/dependencies.json7
-rw-r--r--src/webengine/plugin/experimental/experimental.pro13
-rw-r--r--src/webengine/plugin/experimental/plugin.cpp83
-rw-r--r--src/webengine/plugin/experimental/qmldir3
-rw-r--r--src/webengine/plugin/plugin.cpp36
-rw-r--r--src/webengine/plugin/plugin.pro2
-rw-r--r--src/webengine/plugin/plugins.qmltypes251
-rw-r--r--src/webengine/plugin/testsupport/plugin.cpp2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp30
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h5
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp17
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.h5
-rw-r--r--src/webengine/ui/AuthenticationDialog.qml16
-rw-r--r--src/webengine/ui/ColorDialog.qml2
-rw-r--r--src/webengine/ui/FilePicker.qml2
-rw-r--r--src/webengine/ui/Menu.qml2
-rw-r--r--src/webengine/ui/MessageBubble.qml52
-rw-r--r--src/webengine/ui/PromptDialog.qml34
-rw-r--r--src/webengine/ui/ToolTip.qml91
-rw-r--r--src/webengine/ui/qmldir2
-rw-r--r--src/webengine/ui/ui.pro5
-rw-r--r--src/webengine/ui2/AlertDialog.qml98
-rw-r--r--src/webengine/ui2/AuthenticationDialog.qml135
-rw-r--r--src/webengine/ui2/ConfirmDialog.qml111
-rw-r--r--src/webengine/ui2/Menu.qml57
-rw-r--r--src/webengine/ui2/MenuItem.qml44
-rw-r--r--src/webengine/ui2/MenuSeparator.qml42
-rw-r--r--src/webengine/ui2/PromptDialog.qml114
-rw-r--r--src/webengine/ui2/ToolTip.qml45
-rw-r--r--src/webengine/ui2/information.pngbin0 -> 254 bytes
-rw-r--r--src/webengine/ui2/qmldir2
-rw-r--r--src/webengine/ui2/question.pngbin0 -> 257 bytes
-rw-r--r--src/webengine/ui2/ui2.pro18
-rw-r--r--src/webengine/ui_delegates_manager.cpp235
-rw-r--r--src/webengine/ui_delegates_manager.h44
-rw-r--r--src/webengine/webengine.pro26
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.h1
-rw-r--r--src/webenginewidgets/api/qwebenginecontextmenudata.cpp41
-rw-r--r--src/webenginewidgets/api/qwebenginecontextmenudata.h2
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp32
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.h9
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem_p.h1
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp230
-rw-r--r--src/webenginewidgets/api/qwebenginepage.h18
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h7
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp90
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.h5
-rw-r--r--src/webenginewidgets/api/qwebenginescript.cpp3
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.cpp7
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.h5
-rw-r--r--src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc (renamed from src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc)0
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc1
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc4
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc5
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc13
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc17
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp183
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h25
-rw-r--r--src/webenginewidgets/webenginewidgets.pro4
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp24
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST3
-rw-r--r--tests/auto/quick/qmltests/data/TestWebEngineView.qml22
-rw-r--r--tests/auto/quick/qmltests/data/favicon-candidates-gray.html10
-rw-r--r--tests/auto/quick/qmltests/data/favicon-multi-gray.html10
-rw-r--r--tests/auto/quick/qmltests/data/forms.html12
-rw-r--r--tests/auto/quick/qmltests/data/keyboardEvents.html98
-rw-r--r--tests/auto/quick/qmltests/data/redirect.html3
-rw-r--r--tests/auto/quick/qmltests/data/script-with-metadata.js10
-rw-r--r--tests/auto/quick/qmltests/data/test3.html2
-rw-r--r--tests/auto/quick/qmltests/data/tst_download.qml2
-rw-r--r--tests/auto/quick/qmltests/data/tst_findText.qml19
-rw-r--r--tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml125
-rw-r--r--tests/auto/quick/qmltests/data/tst_formValidation.qml24
-rw-r--r--tests/auto/quick/qmltests/data/tst_keyboardEvents.qml156
-rw-r--r--tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml43
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadUrl.qml329
-rw-r--r--tests/auto/quick/qmltests/data/tst_newViewRequest.qml137
-rw-r--r--tests/auto/quick/qmltests/data/tst_runJavaScript.qml1
-rw-r--r--tests/auto/quick/qmltests/data/tst_settings.qml16
-rw-r--r--tests/auto/quick/qmltests/data/tst_titleChanged.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_userScripts.qml40
-rw-r--r--tests/auto/quick/qmltests/data/tst_viewSource.qml130
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml (renamed from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml (renamed from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml (renamed from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml (renamed from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml)0
-rw-r--r--tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir (renamed from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir)0
-rw-r--r--tests/auto/quick/qmltests/qmltests.pro6
-rw-r--r--tests/auto/quick/qquickwebengineview/BLACKLIST3
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp37
-rw-r--r--tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp20
-rw-r--r--tests/auto/widgets/qwebenginepage/BLACKLIST5
-rw-r--r--tests/auto/widgets/qwebenginepage/resources/test1.html7
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp326
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp20
-rw-r--r--tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp23
-rw-r--r--tests/auto/widgets/qwebenginespellcheck/dict/de-DE.aff5
-rw-r--r--tests/auto/widgets/qwebenginespellcheck/dict/de-DE.dic14
-rw-r--r--tests/auto/widgets/qwebenginespellcheck/qwebenginespellcheck.pro6
-rw-r--r--tests/auto/widgets/qwebenginespellcheck/tst_qwebenginespellcheck.cpp48
-rw-r--r--tests/auto/widgets/qwebengineview/resources/keyboardEvents.html98
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp289
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc1
-rw-r--r--tests/auto/widgets/widgets.pro9
-rw-r--r--tests/manual/manual.pro7
-rw-r--r--tests/manual/quick/faviconbrowser/AddressBar.qml124
-rw-r--r--tests/manual/quick/faviconbrowser/FaviconPanel.qml256
-rw-r--r--tests/manual/quick/faviconbrowser/faviconbrowser.pro23
-rw-r--r--tests/manual/quick/faviconbrowser/faviconbrowser.qrc17
-rw-r--r--tests/manual/quick/faviconbrowser/main.cpp76
-rw-r--r--tests/manual/quick/faviconbrowser/main.qml192
-rw-r--r--tests/manual/quick/faviconbrowser/utils.h70
-rw-r--r--tests/manual/quick/quick.pro4
-rw-r--r--tests/manual/widgets/inputmethods/colorpicker.cpp80
-rw-r--r--tests/manual/widgets/inputmethods/colorpicker.h56
-rw-r--r--tests/manual/widgets/inputmethods/controlview.cpp108
-rw-r--r--tests/manual/widgets/inputmethods/controlview.h66
-rw-r--r--tests/manual/widgets/inputmethods/inputmethods.pro26
-rw-r--r--tests/manual/widgets/inputmethods/main.cpp144
-rw-r--r--tests/manual/widgets/inputmethods/referenceview.cpp49
-rw-r--r--tests/manual/widgets/inputmethods/referenceview.h (renamed from tests/quicktestbrowser/ContextMenuExtras.qml)35
-rw-r--r--tests/manual/widgets/inputmethods/test.qrc5
-rw-r--r--tests/manual/widgets/inputmethods/testdata.csv21
-rw-r--r--tests/manual/widgets/inputmethods/testview.cpp141
-rw-r--r--tests/manual/widgets/inputmethods/testview.h60
-rw-r--r--tests/manual/widgets/inputmethods/webview.cpp50
-rw-r--r--tests/manual/widgets/inputmethods/webview.h40
-rw-r--r--tests/manual/widgets/widgets.pro4
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml5
-rw-r--r--tests/quicktestbrowser/DownloadView.qml1
-rw-r--r--tests/quicktestbrowser/quicktestbrowser.pro2
-rw-r--r--tests/quicktestbrowser/resources.qrc1
-rw-r--r--tools/about_credits_entry.tmpl2
-rw-r--r--tools/qmake/mkspecs/features/configure.prf114
-rw-r--r--tools/qmake/mkspecs/features/default_post.prf11
-rw-r--r--tools/qmake/mkspecs/features/default_pre.prf14
-rw-r--r--tools/qmake/mkspecs/features/functions.prf172
-rw-r--r--tools/qmake/mkspecs/features/gyp_generator.prf2
-rwxr-xr-xtools/scripts/take_snapshot.py92
-rw-r--r--tools/scripts/version_resolver.py6
-rwxr-xr-xtools/scripts/windeploy-examples.py393
408 files changed, 15787 insertions, 18398 deletions
diff --git a/.gitignore b/.gitignore
index 21aab71d2..71d4cbb0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,7 @@ moc_*.cpp
*.pyc
.pch
.obj
+
+# Compiled QML/JS code
+*.qmlc
+*.jsc
diff --git a/.qmake.conf b/.qmake.conf
index 9d4004a02..73dc70b08 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,5 +1,10 @@
QMAKEPATH += $$PWD/tools/qmake
+
+# Resolve root directories for sources
+QTWEBENGINE_ROOT = $$PWD
+QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD)
+
load(qt_build_config)
CONFIG += warning_clean
-MODULE_VERSION = 5.7.1
+MODULE_VERSION = 5.8.0
diff --git a/configure.json b/configure.json
new file mode 100644
index 000000000..63abd1dba
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,34 @@
+{
+ "module": "webengine",
+
+ "commandline": {
+ "options": {
+ "proprietary-codecs": "boolean",
+ "spellchecker": "boolean"
+ }
+ },
+
+ "features": {
+ "proprietary-codecs": {
+ "label": "Proprietary Codecs",
+ "autoDetect": false,
+ "purpose": "Enables the use of proprietary codecs such as h.264/h.265 and MP3",
+ "output": [ "privateFeature" ]
+ },
+ "spellchecker": {
+ "label": "Spellchecker",
+ "purpose": "Enables the use of Chromium's spellchecker",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "summary": [
+ {
+ "section": "Qt WebEngine",
+ "entries": [
+ "proprietary-codecs",
+ "spellchecker"
+ ]
+ }
+ ]
+}
diff --git a/examples/examples.pro b/examples/examples.pro
index 0de2ec505..1a0f3a263 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -2,6 +2,7 @@ TEMPLATE=subdirs
qtHaveModule(webengine) {
SUBDIRS += \
+ webengine/customdialogs \
webengine/minimal \
webengine/quicknanobrowser
}
@@ -13,5 +14,14 @@ qtHaveModule(webenginewidgets) {
webenginewidgets/cookiebrowser \
webenginewidgets/demobrowser \
webenginewidgets/markdowneditor \
- webenginewidgets/simplebrowser \
+ webenginewidgets/simplebrowser
+
+ contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
+ !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+ SUBDIRS += webenginewidgets/spellchecker
+ } else {
+ message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
+ }
+ }
+
}
diff --git a/examples/webengine/customdialogs/MessageRectangle.qml b/examples/webengine/customdialogs/MessageRectangle.qml
new file mode 100644
index 000000000..e0ace7ca5
--- /dev/null
+++ b/examples/webengine/customdialogs/MessageRectangle.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ property alias text: messageText.text
+ width: parent.width
+ height: 30
+ visible: false
+ color: "#80c342"
+ Text {
+ id: messageText
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ font.pointSize: 12
+ }
+}
diff --git a/examples/webengine/customdialogs/SwitchButton.qml b/examples/webengine/customdialogs/SwitchButton.qml
new file mode 100644
index 000000000..75a2c6452
--- /dev/null
+++ b/examples/webengine/customdialogs/SwitchButton.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 1.4 as Controls
+import QtQuick.Layouts 1.3
+
+Item {
+ width: parent.width
+ height: 40
+ property alias checked: switcher.checked
+ RowLayout {
+ anchors.centerIn: parent
+ Text {
+ text: qsTr("Use default dialogs")
+ font.pointSize: 12
+ }
+ Controls.Switch {
+ id: switcher
+ checked: true
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/WebView.qml b/examples/webengine/customdialogs/WebView.qml
new file mode 100644
index 000000000..591789caa
--- /dev/null
+++ b/examples/webengine/customdialogs/WebView.qml
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtWebEngine 1.4
+
+WebEngineView {
+
+ url: "qrc:/index.html"
+ property bool useDefaultDialogs: true
+ signal openForm(var form)
+
+ onContextMenuRequested: function(request) {
+ // we only show menu for links with #openMenu
+ if (!request.linkUrl.toString().endsWith("#openMenu")) {
+ request.accepted = true;
+ return;
+ }
+ // return early to show default menu
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ openForm({item: Qt.resolvedUrl("forms/Menu.qml"),
+ properties: {"request": request}});
+ }
+
+ onAuthenticationDialogRequested: function(request) {
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ openForm({item: Qt.resolvedUrl("forms/Authentication.qml"),
+ properties: {"request": request}});
+ }
+
+ onJavaScriptDialogRequested: function(request) {
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ openForm({item: Qt.resolvedUrl("forms/JavaScript.qml"),
+ properties: {"request": request}});
+ }
+
+ onColorDialogRequested: function(request) {
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ openForm({item: Qt.resolvedUrl("forms/ColorPicker.qml"),
+ properties: {"request": request}});
+ }
+
+ onFileDialogRequested: function(request) {
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ openForm({item: Qt.resolvedUrl("forms/FilePicker.qml"),
+ properties: {"request": request}});
+
+ }
+
+ onFormValidationMessageRequested: function(request) {
+ switch (request.type) {
+ case FormValidationMessageRequest.Show:
+ if (useDefaultDialogs)
+ return;
+
+ request.accepted = true;
+ validationMessage.text = request.text;
+ validationMessage.y = request.anchor.y + request.anchor.height + 10;
+ validationMessage.visible = true;
+ break;
+ case FormValidationMessageRequest.Move:
+ break;
+ case FormValidationMessageRequest.Hide:
+ validationMessage.visible = false;
+ break;
+ }
+ }
+
+ MessageRectangle {
+ id: validationMessage
+ z: 1
+ }
+}
diff --git a/examples/webengine/customdialogs/customdialogs.pro b/examples/webengine/customdialogs/customdialogs.pro
new file mode 100644
index 000000000..5861f3af7
--- /dev/null
+++ b/examples/webengine/customdialogs/customdialogs.pro
@@ -0,0 +1,18 @@
+QT += webengine
+
+HEADERS += \
+ server.h
+
+SOURCES += \
+ main.cpp \
+ server.cpp
+
+RESOURCES += \
+ customdialogs.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/webengine/customdialogs
+INSTALLS += target
+
+qtHaveModule(widgets) {
+ QT += widgets # QApplication is required to get native styling with QtQuickControls
+}
diff --git a/examples/webengine/customdialogs/customdialogs.qrc b/examples/webengine/customdialogs/customdialogs.qrc
new file mode 100644
index 000000000..5ab5b11cd
--- /dev/null
+++ b/examples/webengine/customdialogs/customdialogs.qrc
@@ -0,0 +1,24 @@
+<RCC>
+ <qresource prefix="/">
+ <file>forms/AuthenticationForm.ui.qml</file>
+ <file>forms/Authentication.qml</file>
+ <file>forms/Button.qml</file>
+ <file>forms/ColorCell.qml</file>
+ <file>forms/ColorPickerForm.ui.qml</file>
+ <file>forms/ColorPicker.qml</file>
+ <file>forms/FilePickerForm.ui.qml</file>
+ <file>forms/FilePicker.qml</file>
+ <file>forms/FileRow.qml</file>
+ <file>forms/JavaScriptForm.ui.qml</file>
+ <file>forms/JavaScript.qml</file>
+ <file>forms/MenuForm.ui.qml</file>
+ <file>forms/Menu.qml</file>
+ <file>icon.svg</file>
+ <file>index.html</file>
+ <file>main.qml</file>
+ <file>MessageRectangle.qml</file>
+ <file>style.css</file>
+ <file>SwitchButton.qml</file>
+ <file>WebView.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-auth1.png b/examples/webengine/customdialogs/doc/images/customdialogs-auth1.png
new file mode 100644
index 000000000..2bde8bd8e
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-auth1.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-auth2.png b/examples/webengine/customdialogs/doc/images/customdialogs-auth2.png
new file mode 100644
index 000000000..ce358fca0
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-auth2.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-color1.png b/examples/webengine/customdialogs/doc/images/customdialogs-color1.png
new file mode 100644
index 000000000..a51d1bdd3
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-color1.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-color2.png b/examples/webengine/customdialogs/doc/images/customdialogs-color2.png
new file mode 100644
index 000000000..3b0b2e986
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-color2.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-file1.png b/examples/webengine/customdialogs/doc/images/customdialogs-file1.png
new file mode 100644
index 000000000..0ff39bf38
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-file1.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-file2.png b/examples/webengine/customdialogs/doc/images/customdialogs-file2.png
new file mode 100644
index 000000000..e56078c44
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-file2.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-menu.png b/examples/webengine/customdialogs/doc/images/customdialogs-menu.png
new file mode 100644
index 000000000..3409c951c
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-menu.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-prompt1.png b/examples/webengine/customdialogs/doc/images/customdialogs-prompt1.png
new file mode 100644
index 000000000..988b4deea
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-prompt1.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-prompt2.png b/examples/webengine/customdialogs/doc/images/customdialogs-prompt2.png
new file mode 100644
index 000000000..085339378
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-prompt2.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-validation1.png b/examples/webengine/customdialogs/doc/images/customdialogs-validation1.png
new file mode 100644
index 000000000..38fa86235
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-validation1.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs-validation2.png b/examples/webengine/customdialogs/doc/images/customdialogs-validation2.png
new file mode 100644
index 000000000..247d2711b
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs-validation2.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/images/customdialogs.png b/examples/webengine/customdialogs/doc/images/customdialogs.png
new file mode 100644
index 000000000..13322d2f6
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/images/customdialogs.png
Binary files differ
diff --git a/examples/webengine/customdialogs/doc/src/customdialogs.qdoc b/examples/webengine/customdialogs/doc/src/customdialogs.qdoc
new file mode 100644
index 000000000..f5a18b591
--- /dev/null
+++ b/examples/webengine/customdialogs/doc/src/customdialogs.qdoc
@@ -0,0 +1,337 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webengine/customdialogs
+ \title WebEngine Qt Quick Custom Dialogs Example
+ \ingroup webengine-examples
+ \brief Customizes UI elements of Qt WebEngine's dialogs
+
+ \image customdialogs.png
+
+ A web page might request dialogs for various purposes, such as
+ authentication, picking colors, choosing files, and responding to JavaScript
+ alerts, confirmation requests, and prompts.
+
+ \e {Custom Dialogs} demonstrates how to use WebEngine dialog request objects
+ to implement custom dialogs for use instead of the default dialogs.
+
+ \include examples-run.qdocinc
+
+ \section1 UI Elements of WebEngineView
+
+ In this example, we create a simple \c index.html page that contains buttons
+ and text fields for triggering a context menu and the following dialogs:
+
+ \list
+ \li HTTP Authentication Dialog
+ \li Proxy Authentication Dialog
+ \li JavaScript Alert, Confirm, and Prompt Dialogs
+ \li Color Picker Dialog
+ \li File Picker Dialog
+ \li Form Validation Message
+ \endlist
+
+ \section1 Triggering Dialogs
+
+ The technical details on how the dialogs are triggered are beyond the scope
+ of this example. The only thing worth mentioning is that we fire up the
+ localhost TCP server when the example starts up. The server is needed to
+ get proxy and HTTP authentication requests.
+
+ \section1 Custom Dialogs
+
+ The custom dialogs are just \e {Qt Quick Designer UI Forms} without any
+ business logic. The point here is to present the glue code that is required
+ to display the custom dialog for a particular web engine dialog or a menu
+ request.
+
+ \section1 Creating the Main Window
+
+ In \c main.cpp, we initialize the WebEngine the same way as in the
+ \l {WebEngine Qt Quick Minimal Example}:
+
+ \quotefromfile webengine/customdialogs/main.cpp
+ \skipto main
+ \printuntil }
+
+ In addition, we set up a proxy and a TCP server to be able to simulate proxy
+ and HTTP authetication requests.
+
+ In \c main.qml, we create a top level window, which contains a StackView
+ with a SwitchButton and a WebView:
+
+ \quotefromfile webengine/customdialogs/main.qml
+ \skipto Window
+ \printuntil Component
+ \printuntil }
+ \printline }
+
+ \section1 Handling Web Engine Requests
+
+ In this example, we implement the handling of the following web engine
+ requests:
+
+ \list
+ \li ContextMenuRequest
+ \li AuthenticationDialogRequest
+ \li JavaScriptDialogRequest
+ \li ColorDialogRequest
+ \li FileDialogRequest
+ \li FormValidationMessageRequest
+ \endlist
+
+ \section2 Context Menu Requests
+
+ \l [QML]{ContextMenuRequest} is a request object that is passed as a
+ parameter of the WebEngineView::contextMenuRequested signal. We use the
+ \c onContextMenuRequested signal handler to handle requests for
+ \c #openMenu URL links:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil {
+ \dots 4
+ \skipto onContextMenuRequested
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \dots 4
+ \skipuntil onFormValidationMessageRequested
+ \skipuntil }
+ \skipuntil }
+ \skipuntil }
+ \skipto }
+ \printline }
+
+ The first text field from the top on our page triggers the request. Next,
+ we check whether we should use the default menu. If not, we accept the
+ request and switch the view to show the \c MenuForm:
+
+ \image customdialogs-menu.png
+
+ \quotefromfile webengine/customdialogs/forms/Menu.qml
+ \skipto MenuForm
+ \printuntil }
+ \printuntil }
+
+ To keep things simple, we do not provide any logic on component completion,
+ and we simply close the form on any action.
+
+ \section2 Authentication Dialog Requests
+
+ \image customdialogs-auth1.png
+
+ \l [QML]{AuthenticationDialogRequest} is a request object that is passed
+ as a parameter of the WebEngineView::authenticationDialogRequested signal:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil {
+ \dots 4
+ \skipto onAuthenticationDialogRequested
+ \printuntil }
+ \printuntil }
+ \dots 4
+ \skipuntil onFormValidationMessageRequested
+ \skipuntil }
+ \skipuntil }
+ \skipuntil }
+ \skipto }
+ \printline }
+
+ We use the \c onAuthenticationDialogRequested signal handler to check
+ whether we should use the default authentication dialog. If not, we accept
+ the request and switch the view to show the \c AuthenticationForm:
+
+ \image customdialogs-auth2.png
+
+ \quotefromfile webengine/customdialogs/forms/Authentication.qml
+ \skipto AuthenticationForm
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+ On component completion, we log the request type. The user can fill in the
+ credentials and click \uicontrol Login. We provide \c onClicked handlers to
+ accept or reject the authentication dialog. The TCP server on localhost does
+ not handle real authentication, and therefore we call \c rejectDialog()
+ instead of \c acceptDialog() also for the login button \c clicked signal.
+
+ \section2 JavaScript Dialog Requests
+
+ \image customdialogs-prompt1.png
+
+ \l [QML]{JavaScriptDialogRequest} is a request object that is passed as a
+ parameter of the WebEngineView::javaScriptDialogRequested signal:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil {
+ \dots 4
+ \skipto onJavaScriptDialogRequested
+ \printuntil }
+ \printuntil }
+ \dots 4
+ \skipuntil onFormValidationMessageRequested
+ \skipuntil }
+ \skipuntil }
+ \skipuntil }
+ \skipto }
+ \printline }
+
+ We use the \c onJavaScriptDialogRequested signal handler to check
+ whether we should use the default JavaScript dialog. If not, we accept the
+ request and switch the view to show the \c JavaScriptForm:
+
+ \image customdialogs-prompt2.png
+
+ \quotefromfile webengine/customdialogs/forms/JavaScript.qml
+ \skipto JavaScriptForm
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+ On component completion, we customize the form based on the request type.
+ For a JavaScript prompt dialog we use \c dialogAccept() with the
+ \c prompt.text argument.
+
+ \section2 Color Dialog Requests
+
+ \image customdialogs-color1.png
+
+ \l [QML]{ColorDialogRequest} is a request object that is passed as a
+ parameter of the WebEngineView::colorDialogRequested signal:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil {
+ \dots 4
+ \skipto onColorDialogRequested
+ \printuntil }
+ \printuntil }
+ \dots 4
+ \skipuntil onFormValidationMessageRequested
+ \skipuntil }
+ \skipuntil }
+ \skipuntil }
+ \skipto }
+ \printline }
+
+ We use the \c onColorDialogRequested signal handler to check whether
+ we should use the default color picker dialog. If not, we accept the request
+ and switch the view to show the \c ColorPickerForm:
+
+ \image customdialogs-color2.png
+
+ \quotefromfile webengine/customdialogs/forms/ColorPicker.qml
+ \skipto ColorPickerForm
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+ On component completion, we create callbacks for all the color cells. When
+ the user selects the color and clicks \c OK, we pass the selected color to
+ the \c dialogAccept() method.
+
+ \section2 File Dialog Requests
+
+ \image customdialogs-file1.png
+
+ \l [QML]{FileDialogRequest} is a request object that is passed as a
+ parameter of the WebEngineView::fileDialogRequested signal:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil {
+ \dots 4
+ \skipto onFileDialogRequested
+ \printuntil }
+ \printuntil }
+ \dots 4
+ \skipuntil onFormValidationMessageRequested
+ \skipuntil }
+ \skipuntil }
+ \skipuntil }
+ \skipto }
+ \printline }
+
+ We use the \c onFileDialogRequested signal handler to check whether
+ we should use the default color picker dialog. If not, we accept the request
+ and switch the view to show the \c FilePickerForm:
+
+ \image customdialogs-file2.png
+
+ \quotefromfile webengine/customdialogs/forms/FilePicker.qml
+ \skipto FilePickerForm
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+ On component completion, we create callbacks for selecting files. When the user selects a
+ file and clicks \c OK, we pass the selected file to the \c dialogAccept
+ method.
+
+ \section2 Form Validation Message Requests
+
+ \image customdialogs-validation1.png
+
+ \l [QML]{FormValidationMessageRequest} is a request object that is passed as a
+ parameter of the WebEngineView::formValidationMessageRequested signal:
+
+ \quotefromfile webengine/customdialogs/WebView.qml
+ \skipto WebEngineView
+ \printuntil url
+ \dots 4
+ \skipto onFormValidationMessageRequested
+ \printuntil }
+ \printuntil }
+ \printuntil }
+ \skipto }
+ \printline }
+
+ We use the \c onFormValidationMessageRequested signal handler to check
+ whether we should use the default message bubble. If not, we accept the
+ request and customize \c validationMessage. Depending on the type of the
+ request, we show, move, or hide the message.
+
+ \image customdialogs-validation2.png
+*/
diff --git a/examples/webengine/customdialogs/forms/Authentication.qml b/examples/webengine/customdialogs/forms/Authentication.qml
new file mode 100644
index 000000000..8ee0a416f
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/Authentication.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtWebEngine 1.4
+
+AuthenticationForm {
+ property QtObject request
+ signal closeForm()
+
+ cancelButton.onClicked: {
+ request.dialogReject();
+ closeForm();
+ }
+
+ loginButton.onClicked: {
+ request.dialogReject();
+ closeForm();
+ }
+
+ Component.onCompleted: {
+ switch (request.type) {
+ case AuthenticationDialogRequest.AuthenticationTypeHTTP:
+ console.log("HTTP Authentication Required. Host says: " + request.realm);
+ break;
+ case AuthenticationDialogRequest.AuthenticationTypeProxy:
+ console.log("Proxy Authentication Required for: " + request.proxyHost);
+ break;
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml b/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml
new file mode 100644
index 000000000..0ba27acdb
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/AuthenticationForm.ui.qml
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 1.0 as Controls
+
+Item {
+ id: item1
+ property alias cancelButton: cancelButton
+ property alias loginButton: loginButton
+ property alias userName: userName
+ property alias password: password
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.topMargin: 20
+ anchors.top: parent.top
+ anchors.bottomMargin: 20
+ anchors.bottom: parent.bottom
+ anchors.rightMargin: 20
+ anchors.right: parent.right
+ anchors.leftMargin: 20
+ anchors.left: parent.left
+
+ Image {
+ id: image
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ source: "qrc:/icon.svg"
+ }
+
+ Rectangle {
+ id: rectangle
+ height: 30
+ anchors.rightMargin: 0
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.left: parent.left
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#25a6e2"
+ }
+ GradientStop {
+ color: "#188bd0"
+ }
+ }
+
+ Text {
+ id: textArea
+ x: 54
+ y: 5
+ color: "#ffffff"
+ text: qsTr("Restricted Area")
+ font.pointSize: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+ Item {
+ width: 40
+ height: 40
+ }
+
+ Text {
+ id: userNameText
+ text: qsTr("Username:")
+ font.pointSize: 12
+ }
+
+ Controls.TextField {
+ id: userName
+ width: 300
+ height: 22
+ Layout.fillWidth: true
+ font.pointSize: 12
+ }
+
+ Text {
+ id: passwordText
+ text: qsTr("Password:")
+ font.pointSize: 12
+ }
+
+ Controls.TextField {
+ id: password
+ width: 300
+ height: 26
+ Layout.fillWidth: true
+ font.pointSize: 12
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ RowLayout {
+ id: rowLayout
+ width: 100
+ height: 100
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Button {
+ id: cancelButton
+ width: 90
+ height: 30
+ btnText: qsTr("Cancel")
+ btnBlue: false
+ }
+
+ Button {
+ id: loginButton
+ width: 90
+ height: 30
+ btnText: qsTr("Login")
+ btnBlue: false
+ }
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/Button.qml b/examples/webengine/customdialogs/forms/Button.qml
new file mode 100644
index 000000000..8ae0865d1
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/Button.qml
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+
+Rectangle {
+ id: root
+ width: 200
+ height: 30
+ radius: 5
+ property string btnText: "Name"
+ property bool btnEnable: true
+ property bool btnBlue: true
+ opacity: btnEnable ? 1.0 : 0.5
+ signal clicked()
+ gradient: btnBlue ? blueButton : greenButton
+ Text {
+ id: textArea
+ x: 54
+ y: 5
+ color: "#ffffff"
+ text: parent.btnText
+ font.pointSize: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ font.bold: false
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: {
+ if (btnEnable)
+ root.clicked();
+ }
+ }
+
+ Gradient {
+ id: blueButton
+ GradientStop {
+ position: 0
+ color: "#25a6e2"
+ }
+ GradientStop {
+ position: mouseArea.pressed && root.btnEnable ? 0.7 :1
+ color: "#188bd0"
+ }
+ }
+
+ Gradient {
+ id: greenButton
+ GradientStop {
+ position: 0
+ color: "#80c342"
+ }
+ GradientStop {
+ position: mouseArea.pressed && root.btnEnable ? 0.7 :1
+ color: "#5fac18"
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/ColorCell.qml b/examples/webengine/customdialogs/forms/ColorCell.qml
new file mode 100644
index 000000000..197cca3d3
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/ColorCell.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+
+Rectangle {
+ id: rectangle
+ width: 50
+ height: 50
+ signal clicked()
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: rectangle.clicked(color)
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/ColorPicker.qml b/examples/webengine/customdialogs/forms/ColorPicker.qml
new file mode 100644
index 000000000..d4ab1abae
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/ColorPicker.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[B"
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+
+ColorPickerForm {
+ property QtObject request
+ signal closeForm()
+
+ okButton.onClicked: {
+ request.dialogAccept(colorPicker.color);
+ closeForm();
+ }
+
+ cancelButton.onClicked: {
+ request.dialogReject();
+ closeForm();
+ }
+
+ function createCallback(color) {
+ return function() { colorPicker.color = color };
+ }
+
+ Component.onCompleted:{
+ for (var i = 0; i < grid.children.length; i++) {
+ var cell = grid.children[i];
+ cell.clicked.connect(createCallback(cell.color));
+ }
+ colorPicker.color = request.color;
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/ColorPickerForm.ui.qml b/examples/webengine/customdialogs/forms/ColorPickerForm.ui.qml
new file mode 100644
index 000000000..d50f727f1
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/ColorPickerForm.ui.qml
@@ -0,0 +1,225 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+
+Item {
+ property alias cancelButton: cancelButton
+ property alias okButton: okButton
+ property string message: "Message"
+ property string title: "Title"
+ property alias blue1: blue1
+ property alias grid: grid
+ property alias colorPicker: colorPicker
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.topMargin: 20
+ anchors.top: parent.top
+ anchors.bottomMargin: 20
+ anchors.bottom: parent.bottom
+ anchors.rightMargin: 20
+ anchors.right: parent.right
+ anchors.leftMargin: 20
+ anchors.left: parent.left
+
+ Image {
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ source: "qrc:/icon.svg"
+ }
+
+ Rectangle {
+ height: 30
+ anchors.rightMargin: 0
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.left: parent.left
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#25a6e2"
+ }
+
+ GradientStop {
+ color: "#188bd0"
+ }
+ }
+
+ Text {
+ id: title
+ x: 54
+ y: 5
+ color: "#ffffff"
+ text: qsTr("Select Color")
+ font.pointSize: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+ Item {
+ width: 40
+ height: 40
+ }
+
+ GridLayout {
+ id: grid
+ columns: 5
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ ColorCell {
+ id: blue1
+ color: "#26d5f8"
+ }
+ ColorCell {
+ id: green1
+ color: "#25f93d"
+ }
+ ColorCell {
+ id: red1
+ color: "#f71111"
+ }
+ ColorCell {
+ id: yellow1
+ color: "#faf23c"
+ }
+ ColorCell {
+ id: orange1
+ color: "#ec8505"
+ }
+ ColorCell {
+ id: blue2
+ color: "#037eaa"
+ }
+ ColorCell {
+ id: green2
+ color: "#389a13"
+ }
+ ColorCell {
+ id: red2
+ color: "#b2001b"
+ }
+ ColorCell {
+ id: yellow2
+ color: "#caca03"
+ }
+ ColorCell {
+ id: orange2
+ color: "#bb4900"
+ }
+ ColorCell {
+ id: blue3
+ color: "#01506c"
+ }
+ ColorCell {
+ id: green3
+ color: "#37592b"
+ }
+ ColorCell {
+ id: red3
+ color: "#700113"
+ }
+ ColorCell {
+ id: yellow3
+ color: "#848404"
+ }
+
+ ColorCell {
+ id: orange3
+ color: "#563100"
+ }
+ }
+
+ Item {
+ width: 10
+ height: 10
+ }
+
+ Rectangle {
+ width: 90
+ height: 90
+ color: "#000000"
+ radius: 4
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ Rectangle {
+ id: colorPicker
+ height: 80
+ color: "#ffffff"
+ anchors.rightMargin: 5
+ anchors.leftMargin: 5
+ anchors.bottomMargin: 5
+ anchors.topMargin: 5
+ anchors.fill: parent
+ }
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ RowLayout {
+ id: rowLayout
+ width: 100
+ height: 100
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Button {
+ id: cancelButton
+ width: 90
+ height: 30
+ btnText: qsTr("Cancel")
+ btnBlue: false
+ }
+
+ Button {
+ id: okButton
+ width: 90
+ height: 30
+ btnText: qsTr("OK")
+ btnBlue: false
+ }
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/FilePicker.qml b/examples/webengine/customdialogs/forms/FilePicker.qml
new file mode 100644
index 000000000..e459a5ceb
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/FilePicker.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+
+FilePickerForm {
+ property QtObject request
+ property string selectedFile
+ signal closeForm()
+
+ cancelButton.onClicked: {
+ request.dialogReject();
+ closeForm();
+ }
+
+ okButton.onClicked: {
+ request.dialogAccept('/' + selectedFile);
+ closeForm();
+ }
+
+ function createCallback(fileIndex) {
+ return function() {
+ for (var i = 0; i < files.children.length; i++) {
+ var file = files.children[i];
+ if (i === fileIndex) {
+ selectedFile = file.text;
+ file.selected = true;
+ } else {
+ file.selected = false;
+ }
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ selectedFile = request.defaultFileName;
+ for (var i = 0; i < files.children.length; i++) {
+ var file = files.children[i];
+ file.clicked.connect(createCallback(i));
+ if (file.text === selectedFile)
+ file.selected = true;
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/FilePickerForm.ui.qml b/examples/webengine/customdialogs/forms/FilePickerForm.ui.qml
new file mode 100644
index 000000000..67c9821b2
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/FilePickerForm.ui.qml
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+
+Item {
+ property alias cancelButton: cancelButton
+ property alias okButton: okButton
+ property string message: "Message"
+ property string title: "Title"
+ property alias files: files
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.topMargin: 20
+ anchors.top: parent.top
+ anchors.bottomMargin: 20
+ anchors.bottom: parent.bottom
+ anchors.rightMargin: 20
+ anchors.right: parent.right
+ anchors.leftMargin: 20
+ anchors.left: parent.left
+
+ Image {
+ id: image
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ source: "qrc:/icon.svg"
+ }
+
+ Rectangle {
+ id: rectangle
+ height: 30
+ anchors.rightMargin: 0
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.left: parent.left
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#25a6e2"
+ }
+
+ GradientStop {
+ color: "#188bd0"
+ }
+ }
+
+ Text {
+ id: title
+ x: 54
+ y: 5
+ color: "#ffffff"
+ text: qsTr("Select File")
+ font.pointSize: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+ Item {
+ width: 40
+ height: 40
+ }
+
+ ColumnLayout {
+ id: files
+
+ FileRow {
+ id: filename1
+ text: "example.qdoc"
+ }
+
+ FileRow {
+ id: filename2
+ text: "factory.cpp"
+ }
+
+ FileRow {
+ id: filename3
+ text: "index.html"
+ }
+
+ FileRow {
+ id: filename4
+ text: "main.qml"
+ }
+
+ FileRow {
+ id: filename5
+ text: "qt-logo.png"
+ }
+
+ FileRow {
+ id: filename6
+ text: "window.h"
+ }
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ RowLayout {
+ id: rowLayout
+ width: 20
+ height: 100
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Button {
+ id: cancelButton
+ width: 90
+ height: 30
+ btnText: qsTr("Cancel")
+ btnBlue: false
+ }
+
+ Button {
+ id: okButton
+ width: 90
+ height: 30
+ btnText: qsTr("OK")
+ btnBlue: false
+ }
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/FileRow.qml b/examples/webengine/customdialogs/forms/FileRow.qml
new file mode 100644
index 000000000..be0611323
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/FileRow.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 1.0 as Controls
+
+Item {
+ id: root
+ height: 30
+ property string text: "Filename"
+ property bool selected: false
+ signal clicked()
+
+ RowLayout {
+ id: fileRow
+ width: 100
+
+ Item {
+ id: item5
+ width: 10
+ height: 10
+ }
+
+ Rectangle {
+ id: rectangle2
+ width: 10
+ height: 10
+ color: selected ? "#80c342" : "#25a6e2"
+ }
+
+ Text {
+ id: filename
+ text: root.text
+ font.pointSize: 12
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ width: 200
+ height: 30
+ onClicked: root.clicked()
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/JavaScript.qml b/examples/webengine/customdialogs/forms/JavaScript.qml
new file mode 100644
index 000000000..a97d8e0d4
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/JavaScript.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtWebEngine 1.4
+
+JavaScriptForm {
+ property QtObject request
+ signal closeForm()
+
+ cancelButton.onClicked: {
+ request.dialogReject();
+ closeForm();
+ }
+
+ okButton.onClicked: {
+ request.dialogAccept(prompt.text);
+ closeForm();
+ }
+
+ Component.onCompleted: {
+ switch (request.type) {
+ case JavaScriptDialogRequest.DialogTypeAlert:
+ cancelButton.visible = false;
+ title = qsTr("Alert");
+ message = request.message;
+ prompt.text = "";
+ prompt.visible = false;
+ break;
+ case JavaScriptDialogRequest.DialogTypeConfirm:
+ title = qsTr("Confirm");
+ message = request.message;
+ prompt.text = "";
+ prompt.visible = false;
+ break;
+ case JavaScriptDialogRequest.DialogTypePrompt:
+ title = qsTr("Prompt");
+ message = request.message;
+ prompt.text = request.defaultText;
+ prompt.visible = true;
+ break;
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml b/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml
new file mode 100644
index 000000000..cc0c1908e
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/JavaScriptForm.ui.qml
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 1.0 as Controls
+
+Item {
+ id: item
+ property alias cancelButton: cancelButton
+ property alias okButton: okButton
+ property string message: "Message"
+ property string title: "Title"
+ property alias prompt: prompt
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.topMargin: 20
+ anchors.top: parent.top
+ anchors.bottomMargin: 20
+ anchors.bottom: parent.bottom
+ anchors.rightMargin: 20
+ anchors.right: parent.right
+ anchors.leftMargin: 20
+ anchors.left: parent.left
+
+ Image {
+ id: image
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ source: "qrc:/icon.svg"
+ }
+
+ Rectangle {
+ id: rectangle
+ height: 30
+ anchors.rightMargin: 0
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.left: parent.left
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#25a6e2"
+ }
+
+ GradientStop {
+ color: "#188bd0"
+ }
+ }
+
+ Text {
+ id: title
+ x: 54
+ y: 5
+ color: "#ffffff"
+ text: qsTr("Title")
+ font.pointSize: 12
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+ Item {
+ width: 40
+ height: 40
+ }
+
+ Text {
+ id: message
+ text: item.message
+ font.pointSize: 12
+ }
+
+ Controls.TextField {
+ id: prompt
+ width: 300
+ height: 22
+ Layout.fillWidth: true
+ font.pointSize: 12
+ }
+
+ Item {
+ Layout.fillHeight: true
+ }
+
+ RowLayout {
+ id: rowLayout
+ width: 100
+ height: 100
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Button {
+ id: cancelButton
+ width: 90
+ height: 30
+ btnText: qsTr("Cancel")
+ btnBlue: false
+ }
+
+ Button {
+ id: okButton
+ width: 90
+ height: 30
+ btnText: qsTr("OK")
+ btnBlue: false
+ }
+ }
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/Menu.qml b/examples/webengine/customdialogs/forms/Menu.qml
new file mode 100644
index 000000000..1ba6a84b4
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/Menu.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+
+MenuForm {
+ property QtObject request
+ signal closeForm()
+
+ followLink.onClicked: closeForm()
+ back.onClicked: closeForm()
+ forward.onClicked: closeForm()
+ reload.onClicked: closeForm()
+ copyLinkUrl.onClicked: closeForm()
+ saveLink.onClicked: closeForm()
+ close.onClicked: closeForm()
+
+ Component.onCompleted: {
+ back.btnEnable = false;
+ forward.btnEnable = false;
+ }
+}
diff --git a/examples/webengine/customdialogs/forms/MenuForm.ui.qml b/examples/webengine/customdialogs/forms/MenuForm.ui.qml
new file mode 100644
index 000000000..696511cc7
--- /dev/null
+++ b/examples/webengine/customdialogs/forms/MenuForm.ui.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Layouts 1.3
+
+Item {
+ property alias followLink: followLink
+ property alias back: back
+ property alias forward: forward
+ property alias reload: reload
+ property alias copyLinkUrl: copyLinkUrl
+ property alias saveLink: saveLink
+ property alias close: close
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Image {
+ id: image
+ width: 100
+ height: 100
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ source: "qrc:/icon.svg"
+ }
+
+ Button {
+ id: followLink
+ btnText: qsTr("Follow")
+ }
+
+ Button {
+ id: back
+ btnText: qsTr("Back")
+ }
+
+ Button {
+ id: forward
+ btnText: qsTr("Forward")
+ }
+
+ Button {
+ id: reload
+ btnText: qsTr("Reload")
+ }
+
+ Button {
+ id: copyLinkUrl
+ btnText: qsTr("Copy Link URL")
+ }
+
+ Button {
+ id: saveLink
+ btnText: qsTr("Save Link")
+ }
+
+ Button {
+ id: close
+ btnBlue: false
+ btnText: qsTr("Close")
+ }
+
+ }
+}
diff --git a/examples/webengine/customdialogs/icon.svg b/examples/webengine/customdialogs/icon.svg
new file mode 100644
index 000000000..48271180b
--- /dev/null
+++ b/examples/webengine/customdialogs/icon.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="94px" height="94px" viewBox="0 0 94 94" enable-background="new 0 0 94 94" xml:space="preserve">
+<g>
+ <circle fill="none" cx="47" cy="47" r="47"/>
+ <g>
+ <path fill="#46A2DA" d="M47,92.979c-11.779,0-23.559-4.484-32.526-13.451C-3.461,61.591-3.461,32.409,14.472,14.474
+ C32.41-3.463,61.592-3.461,79.526,14.473c17.935,17.936,17.935,47.119,0.002,65.054l-0.002,0.001
+ C70.559,88.495,58.779,92.979,47,92.979z"/>
+ </g>
+ <path fill="#80C342" d="M93,47C93,21.595,72.405,1,47,1C34.297,1,22.797,6.149,14.473,14.473l65.054,65.054
+ C87.851,71.203,93,59.703,93,47z"/>
+ <g>
+ <path fill="#46A2DA" d="M47,65c-4.808,0-9.328-1.873-12.728-5.272c-7.018-7.019-7.018-18.438,0-25.456
+ C37.672,30.873,42.192,29,47,29s9.328,1.873,12.728,5.272c7.018,7.019,7.018,18.438,0,25.456C56.328,63.127,51.808,65,47,65z"/>
+ <path fill="#FFFFFF" d="M62.248,59.919c6.671-7.858,6.312-19.644-1.105-27.061C57.237,28.953,52.118,27,47,27
+ c-5.118,0-10.237,1.953-14.142,5.858c-7.81,7.81-7.81,20.474,0,28.284C36.763,65.047,41.882,67,47,67
+ c4.379,0,8.752-1.441,12.372-4.3L77.88,81.209c0.989-0.895,1.935-1.837,2.843-2.814L62.248,59.919z M35.686,58.314
+ c-6.238-6.238-6.238-16.389,0-22.627C38.708,32.664,42.726,31,47,31c4.274,0,8.292,1.664,11.314,4.686
+ c6.238,6.238,6.238,16.389,0,22.627C55.292,61.336,51.274,63,47,63C42.726,63,38.708,61.336,35.686,58.314z"/>
+ </g>
+</g>
+</svg>
diff --git a/examples/webengine/customdialogs/index.html b/examples/webengine/customdialogs/index.html
new file mode 100644
index 000000000..43a2dbb67
--- /dev/null
+++ b/examples/webengine/customdialogs/index.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Custom UI</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ </head>
+ <body>
+ <table align="center">
+ <tr>
+ <td><div class="div"><a href="#openMenu" class="link">Right click on text to see link context menu</a></div></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="window.location = 'http://localhost.:5555/OPEN_AUTH'">
+ Open Authentication Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="window.location = 'http://localhost.:5555/OPEN_PROXY'">
+ Open Proxy Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="alert('This is the Alert Dialog !')">
+ Open Alert Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="confirm('This is the Confirm Dialog.')">
+ Open Confirm Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="prompt('Is this the Prompt Dialog ?', 'Yes')">
+ Open Prompt Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="document.getElementById('colorpicker').click()">
+ Open Color Dialog</button></td>
+ </tr>
+ <tr>
+ <td><button class="button" onclick="document.getElementById('filepicker').click()">
+ Open File Dialog</button></td>
+ </tr>
+ <tr>
+ <td>
+ <form><table>
+ <tr><td><button class="button" type="submit">Open Message Bubble</button></td></tr>
+ <tr><td><input class="input" placeholder="For this field we open message bubble..." required/></td></tr>
+ </table></form>
+ </td>
+ </tr>
+ </table>
+ <input type="color" id="colorpicker" value="#ff0000" style="visibility:hidden"/>
+ <input type="file" id="filepicker" accept=".cpp, .html, .h, .png, .qdoc, .qml" style="visibility:hidden"/>
+ </body>
+</html>
diff --git a/examples/webengine/customdialogs/main.cpp b/examples/webengine/customdialogs/main.cpp
new file mode 100644
index 000000000..2f79a1e48
--- /dev/null
+++ b/examples/webengine/customdialogs/main.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "server.h"
+#include <qtwebengineglobal.h>
+#include <QNetworkProxy>
+#include <QQmlApplicationEngine>
+#include <QTimer>
+
+#ifndef QT_NO_WIDGETS
+#include <QtWidgets/QApplication>
+// QApplication is required to get native styling with QtQuickControls
+typedef QApplication Application;
+#else
+#include <QtGui/QGuiApplication>
+typedef QGuiApplication Application;
+#endif
+
+int main(int argc, char *argv[])
+{
+ Application app(argc, argv);
+ QtWebEngine::initialize();
+
+ QQmlApplicationEngine engine;
+ Server *server = new Server(&engine);
+
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+ QTimer::singleShot(0, server, &Server::run);
+
+ QNetworkProxy proxy;
+ proxy.setType(QNetworkProxy::HttpProxy);
+ proxy.setHostName("localhost");
+ proxy.setPort(5555);
+ QNetworkProxy::setApplicationProxy(proxy);
+
+ return app.exec();
+}
+
diff --git a/examples/webengine/customdialogs/main.qml b/examples/webengine/customdialogs/main.qml
new file mode 100644
index 000000000..4288137fc
--- /dev/null
+++ b/examples/webengine/customdialogs/main.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 1.4 as Controls
+import QtQuick.Layouts 1.3
+import QtQuick.Window 2.0
+
+Window {
+ width: 350
+ height: 550
+ visible: true
+
+ Controls.StackView {
+ id: stackView
+ anchors.fill: parent
+ focus: true
+ initialItem: Item {
+ id: main
+ width: parent.width
+ height: parent.height
+ ColumnLayout {
+ anchors.fill: parent
+ SwitchButton {
+ id: switcher
+ Layout.fillWidth: true
+ }
+ WebView {
+ id: webView
+ useDefaultDialogs: switcher.checked
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+ }
+
+ function closeForm()
+ {
+ pop(main);
+ }
+
+ function openForm(form)
+ {
+ push(form);
+ currentItem.closeForm.connect(closeForm);
+ }
+
+ }
+
+ Component.onCompleted: {
+ webView.openForm.connect(stackView.openForm);
+ }
+}
diff --git a/examples/webengine/customdialogs/server.cpp b/examples/webengine/customdialogs/server.cpp
new file mode 100644
index 000000000..21a8ffe5a
--- /dev/null
+++ b/examples/webengine/customdialogs/server.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "server.h"
+#include <QDataStream>
+#include <QTcpSocket>
+
+Server::Server(QObject *parent) : QObject(parent)
+{
+ connect(&m_server, &QTcpServer::newConnection, this, &Server::handleNewConnection);
+}
+
+void Server::run()
+{
+ if (!m_server.listen(QHostAddress::LocalHost, 5555))
+ qWarning() << "Could not start the server -> http/proxy authentication dialog"
+ " will not work. Error:" << m_server.errorString();
+}
+
+void Server::handleNewConnection()
+{
+ QTcpSocket *socket = m_server.nextPendingConnection();
+ connect(socket, &QAbstractSocket::disconnected, socket, &QObject::deleteLater);
+ connect(socket, &QAbstractSocket::readyRead, this, &Server::handleReadReady);
+}
+
+void Server::handleReadReady()
+{
+ QTcpSocket *socket = qobject_cast<QTcpSocket*>(sender());
+ Q_ASSERT(socket);
+ QByteArray msg = socket->readAll();
+ if (msg.contains(QByteArrayLiteral("OPEN_AUTH")))
+ socket->write("HTTP/1.1 401 Unauthorized\nWWW-Authenticate: "
+ "Basic realm=\"Very Restricted Area\"\r\n\r\n");
+ if (msg.contains(QByteArrayLiteral("OPEN_PROXY")))
+ socket->write("HTTP/1.1 407 Proxy Auth Required\nProxy-Authenticate: "
+ "Basic realm=\"Proxy requires authentication\"\r\n\r\n");
+}
diff --git a/examples/webengine/customdialogs/server.h b/examples/webengine/customdialogs/server.h
new file mode 100644
index 000000000..dc96acb70
--- /dev/null
+++ b/examples/webengine/customdialogs/server.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <QObject>
+#include <QTcpServer>
+
+class Server : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit Server(QObject *parent = nullptr);
+
+public slots:
+ void run();
+
+private slots:
+ void handleNewConnection();
+ void handleReadReady();
+
+private:
+ QTcpServer m_server;
+};
+
+#endif // SERVER_H
diff --git a/examples/webengine/customdialogs/style.css b/examples/webengine/customdialogs/style.css
new file mode 100644
index 000000000..e4c25e7eb
--- /dev/null
+++ b/examples/webengine/customdialogs/style.css
@@ -0,0 +1,37 @@
+.div {
+ padding:8px 4px;
+ border: 5px solid #188BD0;
+ width: 280px;
+ font-family: sans-serif;
+ font-size:10pt;
+}
+.link {
+ text-decoration: none;
+ color: #888888;
+}
+.button {
+ background: -webkit-linear-gradient(top,#25A6E2 0%,#188BD0 100%);
+ padding:8px 13px;
+ color:#fff;
+ font-family: sans-serif;
+ font-size:17px;
+ -webkit-border-radius:5px;
+ border:1px solid #1A87FF;
+ width: 300px;
+}
+.button:focus {
+ outline: none;
+}
+.button:active {
+ background: -webkit-linear-gradient(top,#25A6E2 0%,#188BD0 70%);
+}
+.input {
+ padding:8px 4px;
+ border: 5px solid #188BD0;
+ width: 280px;
+ font-family: sans-serif;
+ font-size:10pt;
+}
+.input:focus {
+ outline: none;
+}
diff --git a/examples/webengine/quicknanobrowser/quicknanobrowser.pro b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
index 6cf556984..5a27f5fd4 100644
--- a/examples/webengine/quicknanobrowser/quicknanobrowser.pro
+++ b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
@@ -1,4 +1,4 @@
-requires(contains(QT_CONFIG, accessibility))
+requires(qtConfig(accessibility))
TEMPLATE = app
TARGET = quicknanobrowser
diff --git a/examples/webengine/recipebrowser/doc/images/recipebrowser-demo.jpg b/examples/webengine/recipebrowser/doc/images/recipebrowser-demo.jpg
new file mode 100644
index 000000000..761ad3576
--- /dev/null
+++ b/examples/webengine/recipebrowser/doc/images/recipebrowser-demo.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
new file mode 100644
index 000000000..d33f6bf10
--- /dev/null
+++ b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webengine/recipebrowser
+ \title WebEngine Recipe Browser
+ \ingroup webengine-examples
+ \brief A small hybrid application based on the WebEngineView QML type and Qt Quick Controls 2.
+
+ \image recipebrowser-demo.jpg
+
+ \e {Recipe Browser} demonstrates how to use the \l{WebEngineView} item, \l{Qt Quick} items, and
+ \l{Qt Quick Controls 2} items to develop a small hybrid web browser application.
+ A \l{ListView}-based item is used to display a list of recipe names. Clicking on
+ a name causes the web view to load the respective recipe page. The overall appearance
+ of the application is provided by the \l{Qt Quick Controls 2} items, which have their active
+ style set to the \l{Material Style}{Material} style. The web content is a mix of HTML and
+ Markdown source compiled to HTML, along with CSS and JavaScript.
+
+ \include examples-run.qdocinc
+
+ \section1 C++ Code
+
+ In \c main.cpp, we use the \l{QGuiApplication} and \l{QQmlApplicationEngine}
+ classes to set up and load the main QML file. We call \l{QtWebEngine::initialize} so we can use
+ \l{WebEngineView} in our QML code. We enable high DPI screen support by setting the
+ \l{Qt::AA_EnableHighDpiScaling} attribute. We set the default Qt Quick Controls 2 style
+ to the Material style, so we do not have to specify it for each new item we add. Finally, we use
+ a C++ define to check whether the application is compiled for an embedded platform.
+ The value will be used in the main QML code to determine the window size.
+
+ \quotefromfile webengine/recipebrowser/main.cpp
+ \skipto #include
+ \printuntil }
+
+ \section1 QML Code
+
+ In the \c main.qml file, we first create a top-level window and set a title for it. We also set
+ up the size of the window depending on its primary orientation as well as the platform, so that
+ the application is usable on both desktop and embedded platforms. On desktop, the size
+ is constrained by a minimum of 320x480 pixels up to the maximum size that the screen supports.
+ The default window size is 1024 pixels wide and 768 pixels high in landscape orientation.
+ On embedded devices, the window will occupy the whole screen.
+
+ \quotefromfile webengine/recipebrowser/resources/qml/main.qml
+ \skipto ApplicationWindow
+ \printuntil minimumHeight
+
+ Next, we add a \l{RowLayout} item so we can divide the window into two parts: one being a
+ custom \c RecipeList item containing the recipe titles, and the other being the
+ \l{WebEngineView}, which shows the recipe details. The spacing is set to zero so the items are
+ positioned directly next to each other.
+
+ \printuntil RecipeList
+ \dots 16
+ \skipuntil onRecipeSelected
+ \printline }
+ \printuntil WebEngineView
+ \dots 16
+ \skipuntil busy.running = true
+ \skipline }
+ \skipline }
+ \printline }
+ \printline }
+
+ The \c RecipeList item has a few \l{Layout}{attached Layout properties}, in order to scale the
+ item to a maximum of one third of the layout width. We give the item focus, so that the keyboard
+ can be used to navigate the recipes, in addition to using mouse and touch. We also add a handler
+ for the custom \c recipeSelected signal, to tell the WebEngineView to load the URL of the
+ selected recipe.
+
+ \quotefromfile webengine/recipebrowser/resources/qml/main.qml
+ \skipto RecipeList
+ \printuntil }
+
+ The WebEngineView has similar layout properties, to make it occupy two thirds of the layout
+ width.
+
+ \skipto WebEngineView
+ \printuntil KeyNavigation.priority
+
+ We then disable the \l{WebEngineSettings::focusOnNavigationEnabled}{focusOnNavigationEnabled}
+ setting to make sure that the \l{WebEngineView} does not steal focus from the \c RecipeList
+ item every time its URL is changed. This allows the user to continue navigating through the
+ recipes using the keyboard. We also disable the default context menu by accepting the
+ ContextMenuRequest.
+
+ \skipto focusOnNavigationEnabled
+ \printto firstLoadComplete
+
+ When the application starts, instead of directly showing the \l{WebEngineView}, we show a
+ placeholder \l{Rectangle} with a \l{BusyIndicator} to provide a nicer user experience while the
+ application is loading. Once the first page in the view is loaded, we start a \l{Timer} that
+ will hide the placeholder and show the actual page. The delay provides more time for the recipe
+ images to load, so that when the view is shown, the page is completely rendered. The timer also
+ shows a help \l{ToolTip} that informs the user on how to navigate the recipes.
+
+ \printuntil busy.running = true
+ \printline }
+ \printline }
+ \printline }
+
+ Let's see what the \c RecipeList item looks like from the inside. The root item is a
+ FocusScope to allow transferring focus to the child ListView whenever the root item receives
+ focus. We also declare a custom \c recipeSelected signal, which will be emitted when the current
+ item of the ListView changes.
+
+ \quotefromfile webengine/recipebrowser/resources/qml/RecipeList.qml
+ \skipto FocusScope
+ \printuntil recipeSelected
+
+ A ColumnLayout holds a header \l{Label} above the ListView, and the ListView itself.
+ Again, we set the spacing to zero and make sure the layout occupies the whole space of
+ the parent item.
+
+ \skipto ColumnLayout
+ \printuntil anchors.fill
+
+ Inside the layout there is a styled \l{ToolBar} item, with a \l{Label} inside of it serving as
+ the ListView header.
+
+ \skipto ToolBar
+ \printuntil Label
+ \printuntil }
+ \printuntil }
+
+ The second item inside the layout is a \l{ListView}, whose contents will fill the remaining
+ space in the layout. We set \l{Item::}{clip} to true, so that the delegates that are scrolled
+ up are not seen under the ToolBar item. We set \l{Item::}{focus} to true, so the ListView gains
+ focus when the FocusScope does. We add a vertical scroll bar, so the user can scroll through the
+ recipes if the window size is small. We also specify the recipe model to be used by the
+ ListView as described later in this topic.
+
+ \skipto ListView
+ \printuntil model
+
+ We have an \l{ItemDelegate} set as the ListView delegate, which displays the
+ recipe title. The contentItem is a \l{Text} item, customized with a few properties to adjust the
+ visual appearance and position of the text. We create a binding to the current delegate's model
+ URL, so we can access the respective URL outside the delegate itself. We set the
+ \l{ItemDelegate::}{highlighted} property to \c true whenever the item is the current one in the
+ ListView to provide visual feedback. And we set the focus on the ListView whenever a delegate
+ is clicked, so that keyboard navigation works in case the focus was previously in the
+ WebEngineView.
+
+ \skipto delegate
+ \printuntil onClicked
+ \printuntil }
+ \printuntil }
+
+ A handler is defined for the \c currentItemChanged signal to emit our own \c recipeSelected
+ signal with the URL that the WebEngineView should load.
+
+ \skipto onCurrentItemChanged
+ \printuntil }
+
+ We use a \l{ListModel} with seven \l{ListElement}s, each of which contains a recipe
+ title and the URL to an HTML page contained in a resource file. The model is used to populate
+ the ListView with the recipes and to show the recipe details in the WebEngineView.
+
+ \skipto ListModel
+ \printuntil Cupcakes
+ \printuntil }
+ \printuntil }
+
+ We use a \l{ToolTip} item that is displayed on application startup to inform the users
+ how they can navigate and view the details of each recipe. The ToolTip is shown using the
+ \c showHelp method, which is invoked by the \l{Timer} in the main.qml file.
+
+ \skipto ToolTip
+ \printuntil help.open()
+ \printuntil }
+ \printuntil }
+
+ An example of a recipe page can be seen below. The page uses two stylesheets and
+ two JavaScript files:
+ \list
+ \li \l{http://kevinburke.bitbucket.org/markdowncss/}{markdown.css} is
+ a markdown-friendly stylesheet created by Kevin Burke
+ \li \l{https://github.com/chjj/marked}{marked.min.js} is a markdown parser and
+ compiler designed for speed written by Christopher Jeffrey
+ \li custom.css makes some small styling adjustments to the final recipe page
+ \li custom.js is used to invoke the conversion of the recipe content (which is written in
+ markdown syntax) into HTML
+ \endlist
+
+ The images on the pages are loaded from the compiled resource file.
+
+ \quotefromfile webengine/recipebrowser/resources/pages/soup.html
+ \printuntil </html>
+
+*/
diff --git a/examples/webengine/recipebrowser/main.cpp b/examples/webengine/recipebrowser/main.cpp
new file mode 100644
index 000000000..a4251c3ea
--- /dev/null
+++ b/examples/webengine/recipebrowser/main.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QQmlContext>
+#include <QQuickStyle>
+#include <qtwebengineglobal.h>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QGuiApplication app(argc, argv);
+ QtWebEngine::initialize();
+
+ QQuickStyle::setStyle(QStringLiteral("Material"));
+
+ QQmlApplicationEngine engine;
+
+ bool isEmbedded = false;
+#ifdef QTWEBENGINE_RECIPE_BROWSER_EMBEDDED
+ isEmbedded = true;
+#endif
+ engine.rootContext()->setContextProperty(QStringLiteral("isEmbedded"), isEmbedded);
+
+ engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
+
+ return app.exec();
+}
diff --git a/examples/webengine/recipebrowser/recipebrowser.pro b/examples/webengine/recipebrowser/recipebrowser.pro
new file mode 100644
index 000000000..ea6db13fb
--- /dev/null
+++ b/examples/webengine/recipebrowser/recipebrowser.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += quick qml quickcontrols2 webengine
+
+cross_compile {
+ posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED
+}
+
+SOURCES += main.cpp
+
+RESOURCES += resources/resources.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/webengine/recipebrowser
+INSTALLS += target
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md
new file mode 100644
index 000000000..9e91ab302
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md
@@ -0,0 +1,23 @@
+## markd license
+
+```
+Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+```
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md
new file mode 100644
index 000000000..8f9c807aa
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md
@@ -0,0 +1,12 @@
+## WebEngine Markdown Editor Example
+
+This example uses [QWebEngineView](http://doc.qt.io/qt-5/qwebengineview.html)
+to preview text written using the [Markdown](https://en.wikipedia.org/wiki/Markdown)
+syntax.
+
+### Acknowledgments
+
+The conversion from Markdown to HTML is done with the help of the
+[marked JavaScript library](https://github.com/chjj/marked) by _Christopher Jeffrey_.
+The [style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css)
+was created by _Kevin Burke_.
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/markdown.css b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/markdown.css
new file mode 100644
index 000000000..24fc2ffe2
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/markdown.css
@@ -0,0 +1,260 @@
+body{
+ margin: 0 auto;
+ font-family: Georgia, Palatino, serif;
+ color: #444444;
+ line-height: 1;
+ max-width: 960px;
+ padding: 30px;
+}
+h1, h2, h3, h4 {
+ color: #111111;
+ font-weight: 400;
+}
+h1, h2, h3, h4, h5, p {
+ margin-bottom: 24px;
+ padding: 0;
+}
+h1 {
+ font-size: 48px;
+}
+h2 {
+ font-size: 36px;
+ /* The bottom margin is small. It's designed to be used with gray meta text
+ * below a post title. */
+ margin: 24px 0 6px;
+}
+h3 {
+ font-size: 24px;
+}
+h4 {
+ font-size: 21px;
+}
+h5 {
+ font-size: 18px;
+}
+a {
+ color: #0099ff;
+ margin: 0;
+ padding: 0;
+ vertical-align: baseline;
+}
+a:hover {
+ text-decoration: none;
+ color: #ff6600;
+}
+a:visited {
+ color: purple;
+}
+ul, ol {
+ padding: 0;
+ margin: 0;
+}
+li {
+ line-height: 24px;
+}
+li ul, li ul {
+ margin-left: 24px;
+}
+p, ul, ol {
+ font-size: 16px;
+ line-height: 24px;
+ max-width: 540px;
+}
+pre {
+ padding: 0px 24px;
+ max-width: 800px;
+ white-space: pre-wrap;
+}
+code {
+ font-family: Consolas, Monaco, Andale Mono, monospace;
+ line-height: 1.5;
+ font-size: 13px;
+}
+aside {
+ display: block;
+ float: right;
+ width: 390px;
+}
+blockquote {
+ border-left:.5em solid #eee;
+ padding: 0 2em;
+ margin-left:0;
+ max-width: 476px;
+}
+blockquote cite {
+ font-size:14px;
+ line-height:20px;
+ color:#bfbfbf;
+}
+blockquote cite:before {
+ content: '\2014 \00A0';
+}
+
+blockquote p {
+ color: #666;
+ max-width: 460px;
+}
+hr {
+ width: 540px;
+ text-align: left;
+ margin: 0 auto 0 0;
+ color: #999;
+}
+
+/* Code below this line is copyright Twitter Inc. */
+
+button,
+input,
+select,
+textarea {
+ font-size: 100%;
+ margin: 0;
+ vertical-align: baseline;
+ *vertical-align: middle;
+}
+button, input {
+ line-height: normal;
+ *overflow: visible;
+}
+button::-moz-focus-inner, input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+input[type=checkbox], input[type=radio] {
+ cursor: pointer;
+}
+/* override default chrome & firefox settings */
+input:not([type="image"]), textarea {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+label,
+input,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: normal;
+ margin-bottom: 18px;
+}
+input[type=checkbox], input[type=radio] {
+ cursor: pointer;
+ margin-bottom: 0;
+}
+input[type=text],
+input[type=password],
+textarea,
+select {
+ display: inline-block;
+ width: 210px;
+ padding: 4px;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 18px;
+ height: 18px;
+ color: #808080;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+select, input[type=file] {
+ height: 27px;
+ line-height: 27px;
+}
+textarea {
+ height: auto;
+}
+
+/* grey out placeholders */
+:-moz-placeholder {
+ color: #bfbfbf;
+}
+::-webkit-input-placeholder {
+ color: #bfbfbf;
+}
+
+input[type=text],
+input[type=password],
+select,
+textarea {
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition: border linear 0.2s, box-shadow linear 0.2s;
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+input[type=text]:focus, input[type=password]:focus, textarea:focus {
+ outline: none;
+ border-color: rgba(82, 168, 236, 0.8);
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+ -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+
+/* buttons */
+button {
+ display: inline-block;
+ padding: 4px 14px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ background-color: #0064cd;
+ background-repeat: repeat-x;
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+ background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+ background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+ background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+ background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+ background-image: linear-gradient(top, #049cdb, #0064cd);
+ color: #fff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ border: 1px solid #004b9a;
+ border-bottom-color: #003f81;
+ -webkit-transition: 0.1s linear all;
+ -moz-transition: 0.1s linear all;
+ transition: 0.1s linear all;
+ border-color: #0064cd #0064cd #003f81;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+button:hover {
+ color: #fff;
+ background-position: 0 -15px;
+ text-decoration: none;
+}
+button:active {
+ -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+button::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/marked.min.js b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/marked.min.js
new file mode 100644
index 000000000..f679a4776
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/marked.min.js
@@ -0,0 +1,6 @@
+/**
+ * marked - a markdown parser
+ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
+ * https://github.com/chjj/marked
+ */
+(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(err){if(err){opt.highlight=highlight;return callback(err)}var out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occurred:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/custom.css b/examples/webengine/recipebrowser/resources/pages/assets/custom.css
new file mode 100644
index 000000000..9ddc19466
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/custom.css
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+body {
+ padding-top: 0;
+ margin-top: 0;
+}
+
+#content {
+ display: none;
+}
+
+img {
+ width: 100%;
+ height: 100%;
+}
+
+li {
+ margin-left: 25px;
+}
+
+ol li {
+ margin-bottom: 10px;
+}
+
+* {
+ max-width: 960px !important;
+}
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/custom.js b/examples/webengine/recipebrowser/resources/pages/assets/custom.js
new file mode 100644
index 000000000..aaa22a290
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/custom.js
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+marked.setOptions({
+ renderer: new marked.Renderer(),
+ gfm: true,
+ tables: true,
+ breaks: false,
+ pedantic: false,
+ sanitize: false,
+ smartLists: true,
+ smartypants: false
+});
+
+// Poor man document.ready();
+(function() {
+ var placeholder = document.getElementById('placeholder');
+ var content = document.getElementById('content');
+ placeholder.innerHTML = marked(content.innerHTML);
+})();
diff --git a/examples/webengine/recipebrowser/resources/pages/burger.html b/examples/webengine/recipebrowser/resources/pages/burger.html
new file mode 100644
index 000000000..315c0a866
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/burger.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Insanity Burger</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/burger.jpg" alt="Insanity Burger" title="Insanity Burger" />
+Insanity burger
+===============
+
+### Ingredients
+
+* 800 g minced chuck steak
+* olive oil
+* 1 large red onion
+* 1 splash of white wine vinegar
+* 2 large gherkins
+* 4 sesame-topped brioche burger buns
+* 4-8 rashers of smoked streaky bacon
+* 4 teaspoons American mustard
+* Tabasco Chipotle sauce
+* 4 thin slices of Red Leicester cheese
+* 4 teaspoons tomato ketchup
+
+#### For the burger sauce
+* ¼ of an iceberg lettuce
+* 2 heaped tablespoons mayonnaise
+* 1 heaped tablespoon tomato ketchup
+* 1 teaspoon Tabasco Chipotle sauce
+* 1 teaspoon Worcestershire sauce
+* 1 teaspoon brandy, or bourbon (optional)
+
+### Instructions
+For the best burger, go to your butcher’s and ask them to mince 800g of chuck steak for you.
+This cut has a really good balance of fat and flavoursome meat. Divide it into 4 and, with wet
+hands, roll each piece into a ball, then press into flat patties roughly 12cm wide and about 2cm
+wider than your buns. Place on an oiled plate and chill in the fridge. Next, finely slice the red
+onion, then dress in a bowl with the vinegar and a pinch of sea salt. Slice the gherkins and halve
+the buns. Finely chop the lettuce and mix with the rest of the burger sauce ingredients in a bowl,
+then season to taste.
+
+I like to only cook 2 burgers at a time to achieve perfection, so get two pans on the go – a large
+non-stick pan on a high heat for your burgers and another on a medium heat for the bacon. Pat your
+burgers with oil and season them with salt and pepper. Put 2 burgers into the first pan, pressing
+down on them with a fish slice, then put half the bacon into the other pan. After 1 minute, flip
+the burgers and brush each cooked side with ½ a teaspoon of mustard and a dash of Tabasco. After
+another minute, flip onto the mustard side and brush again with another ½ teaspoon of mustard and
+a second dash of Tabasco on the other side. Cook for one more minute, by which point you can place
+some crispy bacon on top of each burger with a slice of cheese. Add a tiny splash of water to the
+pan and place a heatproof bowl over the burgers to melt the cheese – 30 seconds should do it. At the
+same time, toast 2 split buns in the bacon fat in the other pan until lightly golden. Repeat with
+the remaining two burgers.
+
+To build each burger, add a quarter of the burger sauce to the bun base, then top with a cheesy
+bacon burger, a quarter of the onions and gherkins. Rub the bun top with a teaspoon of ketchup,
+then gently press together. As the burger rests, juices will soak into the bun, so serve right
+away, which is great, or for an extra filthy experience, wrap each one in greaseproof paper, then
+give it a minute to go gorgeous and sloppy.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/cupcakes.html b/examples/webengine/recipebrowser/resources/pages/cupcakes.html
new file mode 100644
index 000000000..c169196f2
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/cupcakes.html
@@ -0,0 +1,54 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Cupcakes</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/cupcakes.jpg" alt="Cupcakes" title="Cupcakes" />
+Cupcakes
+=============
+
+### Ingredients
+
+* 300 g caster sugar
+* 150 ml sunflower oil
+* 1 teaspoon vanilla extract
+* 500 g dairy-free soya yoghurt
+* 2 teaspoons cider vinegar
+* 350 g plain flour
+* 1 teaspoon bicarbonate of soda
+* 1½ teaspoons baking powder
+
+#### For the vegan vanilla icing
+* 200 g dairy-free soya spread , chilled
+* 660 g icing sugar
+* ½ teaspoon vanilla extract
+
+### Instructions
+1. Preheat the oven to 170°C fan/375°F/gas 5.
+2. Place the sugar, oil and vanilla extract in a large bowl, then beat with an electric mixer for 1 to 2 minutes, until well combined.
+3. Mix the yoghurt and vinegar together in a bowl, then add to the mixture and beat for 1 to 2 minutes.
+4. Add the remaining cupcake ingredients and 1 teaspoon of fine sea salt, then whisk until smooth and just combined.
+5. Fill the paper cases two-thirds full with mixture, but don’t bother to smooth it out.
+6. Bake for 20 minutes, or until they spring back when touched. Leave to cool, transferring to a wire cooling rack after 5 minutes.
+7. Meanwhile, make the icing. Beat the soya spread with an electric mixer for 1 to 2 minutes, or until smooth.
+8. Sift the icing sugar into a large bowl, then add to the soya spread in two stages, beating well between each.
+9. Add the vanilla extract and a small splash of water, then whisk for a further few minutes, or until silky smooth – if it’s too stiff, add a splash more water to loosen.
+10. Once the cupcakes are cool, decorate them with the icing and add a few sprinkles too if you like – whatever takes your fancy – then enjoy.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/images/burger.jpg b/examples/webengine/recipebrowser/resources/pages/images/burger.jpg
new file mode 100644
index 000000000..edc0c65de
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/burger.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/cupcakes.jpg b/examples/webengine/recipebrowser/resources/pages/images/cupcakes.jpg
new file mode 100644
index 000000000..cce52ba23
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/cupcakes.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/pasta.jpg b/examples/webengine/recipebrowser/resources/pages/images/pasta.jpg
new file mode 100644
index 000000000..7ac924b79
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/pasta.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/pizza.jpg b/examples/webengine/recipebrowser/resources/pages/images/pizza.jpg
new file mode 100644
index 000000000..8d8f756af
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/pizza.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/skewers.jpg b/examples/webengine/recipebrowser/resources/pages/images/skewers.jpg
new file mode 100644
index 000000000..6bb2f1172
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/skewers.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/soup.jpg b/examples/webengine/recipebrowser/resources/pages/images/soup.jpg
new file mode 100644
index 000000000..fc9dff906
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/soup.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/images/steak.jpg b/examples/webengine/recipebrowser/resources/pages/images/steak.jpg
new file mode 100644
index 000000000..240b72eb4
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/images/steak.jpg
Binary files differ
diff --git a/examples/webengine/recipebrowser/resources/pages/pasta.html b/examples/webengine/recipebrowser/resources/pages/pasta.html
new file mode 100644
index 000000000..c94b0df0a
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/pasta.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Pasta</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/pasta.jpg" alt="Pasta" title="Pasta" />
+Pasta
+=============
+
+### Ingredients
+
+* 2 red peppers , deseeded and sliced
+* 2 yellow peppers , deseeded and sliced
+* extra virgin olive oil
+* sea salt
+* freshly ground black pepper
+* 2 red onions , peeled and finely sliced
+* 2 cloves garlic , peeled and grated
+* 2 handfuls fresh flat-leaf parsley , leaves finely chopped, stalks reserved
+* 2 tablespoons red wine vinegar or balsamic vinegar
+* 2 handfuls Parmesan cheese , grated
+* 2 heaped tablespoons mascarpone cheese or crème fraîche , optional
+* 455 g rigatoni, penne or spaghetti
+
+
+### Instructions
+1. Put all the peppers in a large frying pan over a medium heat with a little olive oil and a pinch of salt and pepper.
+2. Place a lid on, and cook slowly for 15 minutes until softened. Don't rush this too much, as cooking the peppers slowly like this really helps to bring out the flavour.
+3. Add the onion and cook for a further 20 minutes.
+4. Then add the garlic and parsley stalks and toss around, keeping everything moving in the pan.
+5. Cook for about 3 minutes most. Have a little taste, and season with a bit more salt and pepper.
+5. Add the vinegar - it will sizzle away, so give everything a good toss.
+6. Then add one handful of the grated Parmesan and the mascarpone or crème fraîche if you are using it and turn the heat down to minimum while you cook the pasta.
+7. Meanwhile put a large pot of salted water on to boil.
+8. Add the pasta to the boiling water and cook according to the packet instructions.
+9. When cooked, drain in a colander, reserving some of the cooking water.
+10. Put the peppers, pasta and parsley leaves into a large warmed bowl.
+11. Give them a good toss together, then add a little of the pasta cooking water and a few good lugs of extra virgin olive oil to coat the pasta nicely.
+12. Serve straight away sprinkled with the rest of the Parmesan.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/pizza.html b/examples/webengine/recipebrowser/resources/pages/pizza.html
new file mode 100644
index 000000000..a1ebfa18e
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/pizza.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Pizza Diavola</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/pizza.jpg" alt="Pizza Diavola" title="Pizza Diavola" />
+Pizza Diavola
+=============
+
+### Ingredients
+
+* 2 pizza dough balls
+* 100g Mozzarella
+* 400g Passata
+* 200 g Spicy Salami
+* 2 fresh chillies
+* Extra virgin olive oil
+* Salt
+
+### Instructions
+1. Preheat oven to 210 oc.
+2. Get your pizza dough balls ( depending on how many you are making) and roll them out to about 12 inches diameter using your hands in a circular stretching technique or using a rolling pin.
+3. With the dough prepared now get our sauce ready by mixing the passata with three tbsp of the olive oil and a good pinch of salt.
+4. Now slice up your salami into thin-ish slices and also finely chop the fresh chillies.
+5. Next, slice or dice your mozzarella and we are ready to dress the pizza.
+6. Add half the tomato sauce to each base and spread evenly leaving a half inch perimeter.
+7. Add the mozzarella, salami and finish with the chillies.
+8. Finally drizzle with some more olive oil and your are ready to cook your pizza diavola.
+9. Place in the oven for ten minutes or until golden.
+10. Remove from the oven, slice, and enjoy your pizza diavola.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/skewers.html b/examples/webengine/recipebrowser/resources/pages/skewers.html
new file mode 100644
index 000000000..63d85f7e1
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/skewers.html
@@ -0,0 +1,54 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Grilled skewers</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/skewers.jpg" alt="Grilled skewers" title="Grilled skewers" />
+Grilled skewers
+======================
+
+### Ingredients
+
+* 3 cloves of garlic
+* 200g kefalotyri cheese
+* 2 medium aubergine
+* 1 iceberg lettuce
+* 1 tablespoon coriander seeds
+* 2 teaspoons dried oregano
+* 2 lemons
+* 4 tablespoons olive oil
+* 600g lamb neck fillet , in 2cm chunks
+* 12 fresh bay leaves
+
+### Instructions
+1. Peel and crush the garlic.
+2. Chop the cheese into bite-sized pieces, trim and chop the aubergines into 2cm chunks, and trim and finely slice the lettuce.
+3. Finely crush the coriander seeds in a pestle and mortar and add to a large bowl with the oregano and garlic. Finely grate in the lemon zest (reserve the zested lemons) and stir in the oil.
+4. Season, then add the cheese, lamb, aubergines and bay leaves. Leave to marinate for at least an hour, or overnight if you can.
+5. Meanwhile, pickle your cabbage. Trim, core and finely slice the cabbage, then place in a colander in the sink or over a bowl and toss with 2 teaspoons of sea salt. Cover and set aside for at least 2 hours, then rinse.
+6. Peel and finely slice the onions, then transfer to a bowl along with the cabbage.
+7. Put the remaining ingredients in a pan and bring to a boil. Simmer for 10 minutes, then pour over the cabbage and onions. Transfer to sterilised jars – this will keep for up to 1 month.
+8. For the flatbreads, put the flour, baking powder, buttermilk and half of the sesame seeds in a bowl and mix until everything is combined.
+9. Tip onto a lightly floured surface and knead briefly. Divide into six, using a rolling pin to roll them into 1 to 2mm rounds.
+10. Scatter with the remaining sesame seeds and run the rolling pin over them. Pop the flatbreads onto the hot barbecue for 1 to 2 minutes on each side.
+11. Load 12 skewers with the cheese, lamb, aubergines and bay leaves, then place on the barbecue (not directly over the coals) for 20 to 25 minutes, turning often, until the lamb is medium-rare and the aubergines are cooked.
+12. Serve the lamb with the flatbreads, cabbage, lettuce and lemon wedges.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/soup.html b/examples/webengine/recipebrowser/resources/pages/soup.html
new file mode 100644
index 000000000..c7537d94c
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/soup.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Soup</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/soup.jpg" alt="Soup" title="Soup" />
+Soup
+=============
+
+### Ingredients
+
+* 2 potatoes
+* 2 onions
+* 2 cloves of garlic
+* olive oil
+* 400 ml organic stock
+* 3 bunches of watercress
+
+### Instructions
+* Peel and roughly chop the potatoes, onions and garlic.
+* In a large saucepan, heat a little olive oil, then sauté the potato, onion and garlic until the onions are translucent.
+* Add the stock and simmer until the potato is soft. Chop and add the watercress and simmer for a further 3 to 4 minutes.
+* Using a hand blender, liquidise the soup until smooth.
+* Serve with a swirl of crème fraîche and some Fortt’s Bath Oliver biscuits, if you like.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/pages/steak.html b/examples/webengine/recipebrowser/resources/pages/steak.html
new file mode 100644
index 000000000..1871f0fe8
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/steak.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Grilled steak and rice</title>
+ <link rel="stylesheet" type="text/css" href="assets/3rdparty/markdown.css">
+ <link rel="stylesheet" type="text/css" href="assets/custom.css">
+</head>
+<body>
+ <div id="placeholder"></div>
+ <div id="content">
+
+<img src="images/steak.jpg" alt="Grilled steak and rice" title="Grilled steak and rice" />
+Grilled steak and rice
+======================
+
+### Ingredients
+
+#### For the ratatouille
+* courgette
+* 1 small aubergine
+* 2 mixed-color peppers
+* 1 red onion
+* 1 heaped teaspoon harissa
+* 2 anchovy fillets
+* 2-4 cloves of garlic
+* 700 g passata
+* 1 tablespoon balsamic vinegar
+* ½ bunch fresh basil
+* 2 tablespoons fat-free natural yoghurt
+
+#### For the rice
+* 1 mug (300g) 10-minute wholegrain or basmati rice
+* 1 good pinch saffron
+* ½ lemon
+
+#### For the steak
+* 2 x 250 g quality sirloin steaks, fat removed
+* 1 teaspoon sweet paprika olive oil
+* ½ bunch fresh flat-leaf parsley
+* 1 heaped teaspoon Dijon mustard
+* 1 tablespoon extra virgin olive oil
+* ½ lemon
+
+### Instructions
+1. Halve the courgette lengthways, slice the aubergine 1cm thick and place both on the griddle pan, turning when charred.
+2. Put 1 mug of rice, 2 mugs of boiling water, the saffron, lemon half and a pinch of salt into the small pan, cover and cook until fluffy, stirring occasionally.
+3. Tear the seeds and stalks out of the peppers, then roughly chop with the peeled red onion and put into the casserole pan with the harissa, anchovies and 1 teaspoon of their oil.
+4. Squash in the unpeeled garlic through a garlic crusher and stir regularly.
+5. Remove the charred courgette and aubergine from the griddle pan, leaving it on the heat, and roughly chop them on a board.
+6. Add them to the casserole pan along with the passata and vinegar, and boil with the lid on.
+7. Rub the steaks with salt, the paprika and 1 teaspoon of olive oil and place on the hot griddle pan, turning every minute until cooked to your liking.
+8. On a board, finely slice the parsley stalks and roughly chop the leaves.
+9. Add the mustard and extra virgin olive oil, season with salt and pepper and squeeze over the lemon juice, then mix together and spread over the board.
+10. When the steaks are done, transfer them to the board, turn in the dressing, then slice.
+11. Tear the top leafy half of the basil into the ratatouille, season to taste, and serve with yoghurt and saffron rice.
+
+**Enjoy!**
+
+ </div><!--End of content-->
+
+ <script src="assets/3rdparty/marked.min.js"></script>
+ <script src="assets/custom.js"></script>
+</body>
+</html>
+
+
+
diff --git a/examples/webengine/recipebrowser/resources/qml/RecipeList.qml b/examples/webengine/recipebrowser/resources/qml/RecipeList.qml
new file mode 100644
index 000000000..c2432631e
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/qml/RecipeList.qml
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Layouts 1.0
+
+FocusScope {
+ id: root
+ signal recipeSelected(url url)
+
+ ColumnLayout {
+ spacing: 0
+ anchors.fill: parent
+
+ ToolBar {
+ id: headerBackground
+ Layout.fillWidth: true
+ implicitHeight: headerText.height + 20
+
+ Label {
+ id: headerText
+ width: parent.width
+ text: qsTr("Favorite recipes")
+ padding: 10
+ anchors.centerIn: parent
+ }
+ }
+
+ ListView {
+ id: listView
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ keyNavigationWraps: true
+ clip: true
+ focus: true
+ ScrollBar.vertical: ScrollBar { }
+
+ model: recipeModel
+
+ delegate: ItemDelegate {
+ width: parent.width
+ text: model.name
+ contentItem: Text {
+ text: parent.text
+ font: parent.font
+ color: parent.enabled ? parent.Material.primaryTextColor
+ : parent.Material.hintTextColor
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ wrapMode: Text.Wrap
+ }
+
+ property url url: model.url
+ highlighted: ListView.isCurrentItem
+
+ onClicked: {
+ listView.forceActiveFocus()
+ listView.currentIndex = model.index
+ }
+ }
+
+ onCurrentItemChanged: {
+ root.recipeSelected(currentItem.url)
+ }
+
+ ListModel {
+ id: recipeModel
+
+ ListElement {
+ name: "Pizza Diavola"
+ url: "qrc:///pages/pizza.html"
+ }
+ ListElement {
+ name: "Steak"
+ url: "qrc:///pages/steak.html"
+ }
+ ListElement {
+ name: "Burger"
+ url: "qrc:///pages/burger.html"
+ }
+ ListElement {
+ name: "Soup"
+ url: "qrc:///pages/soup.html"
+ }
+ ListElement {
+ name: "Pasta"
+ url: "qrc:///pages/pasta.html"
+ }
+ ListElement {
+ name: "Grilled Skewers"
+ url: "qrc:///pages/skewers.html"
+ }
+ ListElement {
+ name: "Cupcakes"
+ url: "qrc:///pages/cupcakes.html"
+ }
+ }
+
+ ToolTip {
+ id: help
+ implicitWidth: root.width - padding * 3
+ y: root.y + root.height
+ delay: 1000
+ timeout: 5000
+ text: qsTr("Use keyboard, mouse, or touch controls to navigate through the\
+ recipes.")
+
+ contentItem: Text {
+ text: help.text
+ font: help.font
+ color: help.Material.primaryTextColor
+ wrapMode: Text.Wrap
+ }
+ }
+ }
+ }
+
+ function showHelp() {
+ help.open()
+ }
+}
+
diff --git a/examples/webengine/recipebrowser/resources/qml/main.qml b/examples/webengine/recipebrowser/resources/qml/main.qml
new file mode 100644
index 000000000..b49cb6649
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/qml/main.qml
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQml 2.0
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Window 2.0
+import QtWebEngine 1.4
+
+ApplicationWindow {
+ id: appWindow
+ title: qsTr("Recipe Browser")
+ visible: true
+
+ property int shorterDesktop: 768
+ property int longerDesktop: 1024
+ property int shorterMin: 360
+ property int longerMin: 480
+ property bool isPortrait: Screen.primaryOrientation === Qt.PortraitOrientation
+ width: {
+ if (isEmbedded)
+ return Screen.width
+ var potentialWidth = shorterDesktop
+ if (!isPortrait)
+ potentialWidth = longerDesktop
+ return potentialWidth > Screen.width ? Screen.width : potentialWidth
+ }
+ height: {
+ if (isEmbedded)
+ return Screen.height
+ var potentialHeight = longerDesktop
+ if (!isPortrait)
+ potentialHeight = shorterDesktop
+ return potentialHeight > Screen.height ? Screen.height : potentialHeight
+ }
+ minimumWidth: isPortrait ? shorterMin : longerMin
+ minimumHeight: isPortrait ? longerMin : shorterMin
+
+ RowLayout {
+ id: container
+ anchors.fill: parent
+ spacing: 0
+
+ RecipeList {
+ id: recipeList
+ Layout.minimumWidth: 124
+ Layout.preferredWidth: parent.width / 3
+ Layout.maximumWidth: 300
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ focus: true
+ KeyNavigation.tab: webView
+ onRecipeSelected: webView.showRecipe(url)
+ }
+
+ WebEngineView {
+ id: webView
+ Layout.preferredWidth: 2 * parent.width / 3
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ KeyNavigation.tab: recipeList
+ KeyNavigation.priority: KeyNavigation.BeforeItem
+ // Make sure focus is not taken by the web view, so user can continue navigating
+ // recipes with the keyboard.
+ settings.focusOnNavigationEnabled: false
+
+ onContextMenuRequested: function(request) {
+ request.accepted = true
+ }
+
+ property bool firstLoadComplete: false
+ onLoadingChanged: {
+ if (loadRequest.status === WebEngineView.LoadSucceededStatus
+ && !firstLoadComplete) {
+ // Debounce the showing of the web content, so images are more likely
+ // to have loaded completely.
+ showTimer.start()
+ }
+ }
+
+ Timer {
+ id: showTimer
+ interval: 500
+ repeat: false
+ onTriggered: {
+ webView.show(true)
+ webView.firstLoadComplete = true
+ recipeList.showHelp()
+ }
+ }
+
+ Rectangle {
+ id: webViewPlaceholder
+ anchors.fill: parent
+ z: 1
+ color: "white"
+
+ BusyIndicator {
+ id: busy
+ anchors.centerIn: parent
+ }
+ }
+
+ function showRecipe(url) {
+ webView.url = url
+ }
+
+ function show(show) {
+ if (show === true) {
+ busy.running = false
+ webViewPlaceholder.visible = false
+ } else {
+ webViewPlaceholder.visible = true
+ busy.running = true
+ }
+ }
+ }
+ }
+}
diff --git a/examples/webengine/recipebrowser/resources/resources.qrc b/examples/webengine/recipebrowser/resources/resources.qrc
new file mode 100644
index 000000000..ae5aa2ed3
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/resources.qrc
@@ -0,0 +1,28 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/main.qml</file>
+ <file>qml/RecipeList.qml</file>
+
+ <file>pages/pizza.html</file>
+ <file>pages/burger.html</file>
+ <file>pages/steak.html</file>
+ <file>pages/soup.html</file>
+ <file>pages/pasta.html</file>
+ <file>pages/skewers.html</file>
+ <file>pages/cupcakes.html</file>
+
+ <file>pages/assets/3rdparty/marked.min.js</file>
+ <file>pages/assets/3rdparty/default.md</file>
+ <file>pages/assets/3rdparty/markdown.css</file>
+ <file>pages/assets/custom.css</file>
+ <file>pages/assets/custom.js</file>
+
+ <file>pages/images/burger.jpg</file>
+ <file>pages/images/pizza.jpg</file>
+ <file>pages/images/steak.jpg</file>
+ <file>pages/images/soup.jpg</file>
+ <file>pages/images/pasta.jpg</file>
+ <file>pages/images/skewers.jpg</file>
+ <file>pages/images/cupcakes.jpg</file>
+ </qresource>
+</RCC>
diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
index f044219ca..926c4a5d7 100644
--- a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
@@ -109,6 +109,9 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
, m_historyForward(0)
, m_stop(0)
, m_reload(0)
+#ifndef QT_NO_PRINTER
+ , m_currentPrinter(nullptr)
+#endif
{
setToolButtonStyle(Qt::ToolButtonFollowStyle);
setAttribute(Qt::WA_DeleteOnClose, true);
@@ -312,6 +315,8 @@ void BrowserMainWindow::setupMenu()
fileMenu->addSeparator();
#if defined(QWEBENGINEPAGE_PRINT)
fileMenu->addAction(tr("P&rint Preview..."), this, SLOT(slotFilePrintPreview()));
+#endif
+#ifndef QT_NO_PRINTER
fileMenu->addAction(tr("&Print..."), this, SLOT(slotFilePrint()), QKeySequence::Print);
#endif
fileMenu->addAction(tr("&Print to PDF..."), this, SLOT(slotFilePrintToPDF()));
@@ -403,7 +408,10 @@ void BrowserMainWindow::setupMenu()
viewMenu->addAction(tr("Reset &Zoom"), this, SLOT(slotViewResetZoom()), QKeySequence(Qt::CTRL | Qt::Key_0));
viewMenu->addSeparator();
- viewMenu->addAction(tr("Page S&ource"), this, SLOT(slotViewPageSource()), tr("Ctrl+Alt+U"));
+ QAction *m_pageSource = viewMenu->addAction(tr("Page S&ource"));
+ m_pageSource->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_U));
+ m_tabWidget->addWebAction(m_pageSource, QWebEnginePage::ViewSource);
+
QAction *a = viewMenu->addAction(tr("&Full Screen"), this, SLOT(slotViewFullScreen(bool)), Qt::Key_F11);
a->setCheckable(true);
@@ -710,10 +718,10 @@ void BrowserMainWindow::slotFilePrintPreview()
void BrowserMainWindow::slotFilePrint()
{
-#if defined(QWEBENGINEPAGE_PRINT)
+#ifndef QT_NO_PRINTER
if (!currentTab())
return;
- printRequested(currentTab()->page()->mainFrame());
+ printRequested(currentTab()->page());
#endif
}
@@ -747,16 +755,29 @@ void BrowserMainWindow::slotFilePrintToPDF()
currentTab()->page()->printToPdf(invoke(this, &BrowserMainWindow::slotHandlePdfPrinted), dialog->pageLayout());
}
-#if defined(QWEBENGINEPAGE_PRINT)
-void BrowserMainWindow::printRequested(QWebEngineFrame *frame)
+#ifndef QT_NO_PRINTER
+void BrowserMainWindow::slotHandlePagePrinted(bool result)
+{
+ Q_UNUSED(result);
+
+ delete m_currentPrinter;
+ m_currentPrinter = nullptr;
+}
+
+
+void BrowserMainWindow::printRequested(QWebEnginePage *page)
{
#ifndef QT_NO_PRINTDIALOG
- QPrinter printer;
- QPrintDialog *dialog = new QPrintDialog(&printer, this);
+ if (m_currentPrinter)
+ return;
+ m_currentPrinter = new QPrinter();
+ QScopedPointer<QPrintDialog> dialog(new QPrintDialog(m_currentPrinter, this));
dialog->setWindowTitle(tr("Print Document"));
- if (dialog->exec() != QDialog::Accepted)
+ if (dialog->exec() != QDialog::Accepted) {
+ slotHandlePagePrinted(false);
return;
- frame->print(&printer);
+ }
+ page->print(m_currentPrinter, invoke(this, &BrowserMainWindow::slotHandlePagePrinted));
#endif
}
#endif
@@ -867,20 +888,6 @@ void BrowserMainWindow::slotViewFullScreen(bool makeFullScreen)
}
}
-void BrowserMainWindow::slotViewPageSource()
-{
- if (!currentTab())
- return;
-
- QPlainTextEdit *view = new QPlainTextEdit;
- view->setWindowTitle(tr("Page Source of %1").arg(currentTab()->title()));
- view->setMinimumWidth(640);
- view->setAttribute(Qt::WA_DeleteOnClose);
- view->show();
-
- currentTab()->page()->toHtml(invoke(view, &QPlainTextEdit::setPlainText));
-}
-
void BrowserMainWindow::slotHome()
{
QSettings settings;
diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.h b/examples/webenginewidgets/demobrowser/browsermainwindow.h
index 9fb6b0851..91e1c1d2f 100644
--- a/examples/webenginewidgets/demobrowser/browsermainwindow.h
+++ b/examples/webenginewidgets/demobrowser/browsermainwindow.h
@@ -56,7 +56,10 @@
#include <QtCore/QUrl>
QT_BEGIN_NAMESPACE
-class QWebEngineFrame;
+#ifndef QT_NO_PRINTER
+class QPrinter;
+#endif
+class QWebEnginePage;
QT_END_NAMESPACE
class AutoSaver;
@@ -123,7 +126,6 @@ private slots:
void slotViewToolbar();
void slotViewBookmarksBar();
void slotViewStatusbar();
- void slotViewPageSource();
void slotViewFullScreen(bool enable);
void slotWebSearch();
@@ -140,8 +142,9 @@ private slots:
void slotSwapFocus();
void slotHandlePdfPrinted(const QByteArray&);
-#if defined(QWEBENGINEPAGE_PRINT)
- void printRequested(QWebEngineFrame *frame);
+#ifndef QT_NO_PRINTER
+ void slotHandlePagePrinted(bool result);
+ void printRequested(QWebEnginePage *page);
#endif
void geometryChangeRequested(const QRect &geometry);
void updateToolbarActionText(bool visible);
@@ -177,6 +180,10 @@ private:
QAction *m_restoreLastSession;
QAction *m_addBookmark;
+#ifndef QT_NO_PRINTER
+ QPrinter *m_currentPrinter;
+#endif
+
QIcon m_reloadIcon;
QIcon m_stopIcon;
diff --git a/examples/webenginewidgets/demobrowser/webview.cpp b/examples/webenginewidgets/demobrowser/webview.cpp
index a785ae48b..ab2a4f3c6 100644
--- a/examples/webenginewidgets/demobrowser/webview.cpp
+++ b/examples/webenginewidgets/demobrowser/webview.cpp
@@ -365,6 +365,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu = new QMenu(this);
menu->addAction(page()->action(QWebEnginePage::OpenLinkInThisWindow));
menu->addAction(page()->action(QWebEnginePage::OpenLinkInNewWindow));
+ menu->addAction(page()->action(QWebEnginePage::OpenLinkInNewTab));
menu->addAction(page()->action(QWebEnginePage::OpenLinkInNewBackgroundTab));
menu->addSeparator();
menu->addAction(page()->action(QWebEnginePage::DownloadLinkToDisk));
@@ -392,11 +393,6 @@ void WebView::wheelEvent(QWheelEvent *event)
QWebEngineView::wheelEvent(event);
}
-void WebView::openLinkInNewTab()
-{
- pageAction(QWebEnginePage::OpenLinkInNewTab)->trigger();
-}
-
void WebView::onFeaturePermissionRequested(const QUrl &securityOrigin, QWebEnginePage::Feature feature)
{
FeaturePermissionBar *permissionBar = new FeaturePermissionBar(this);
diff --git a/examples/webenginewidgets/demobrowser/webview.h b/examples/webenginewidgets/demobrowser/webview.h
index 8cb502fd1..7531254d6 100644
--- a/examples/webenginewidgets/demobrowser/webview.h
+++ b/examples/webenginewidgets/demobrowser/webview.h
@@ -115,7 +115,6 @@ private slots:
void setProgress(int progress);
void loadFinished(bool success);
void setStatusBarText(const QString &string);
- void openLinkInNewTab();
void onFeaturePermissionRequested(const QUrl &securityOrigin, QWebEnginePage::Feature);
void onIconChanged(const QIcon &icon);
diff --git a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
index 3a9908ea6..0239c1065 100644
--- a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
+++ b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
@@ -113,11 +113,16 @@
\quotefromfile webenginewidgets/markdowneditor/mainwindow.cpp
\skipto MainWindow::MainWindow
- \printto connect
+ \printto PreviewPage
The constructor first calls \c setupUi to construct the widgets and menu
actions according to the UI file. The text editor font is set to one
- with a fixed character width. It then makes sure our custom
+ with a fixed character width, and the QWebEngineView widget is told not
+ to show a context menu.
+
+ \printto connect
+
+ Here the constructor makes sure our custom
\c PreviewPage is used by the QWebEngineView instance in \c{ui->preview}.
\printto ui->preview
diff --git a/examples/webenginewidgets/markdowneditor/mainwindow.cpp b/examples/webenginewidgets/markdowneditor/mainwindow.cpp
index 417858d8d..9981d177d 100644
--- a/examples/webenginewidgets/markdowneditor/mainwindow.cpp
+++ b/examples/webenginewidgets/markdowneditor/mainwindow.cpp
@@ -65,6 +65,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
ui->editor->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
+ ui->preview->setContextMenuPolicy(Qt::NoContextMenu);
PreviewPage *page = new PreviewPage(this);
ui->preview->setPage(page);
diff --git a/examples/webenginewidgets/spellchecker/data/icon.svg b/examples/webenginewidgets/spellchecker/data/icon.svg
new file mode 100644
index 000000000..b90ff26dd
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/icon.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="94px" height="94px" viewBox="0 0 94 94" enable-background="new 0 0 94 94" xml:space="preserve">
+<g>
+ <circle fill="none" cx="47" cy="47" r="47"/>
+ <g>
+ <path fill="#46A2DA" d="M47,92.979c-11.779,0-23.559-4.484-32.526-13.451C-3.461,61.591-3.461,32.409,14.472,14.474
+ C32.41-3.463,61.592-3.461,79.526,14.473c17.935,17.936,17.935,47.119,0.002,65.054l-0.002,0.001
+ C70.559,88.495,58.779,92.979,47,92.979z"/>
+ </g>
+ <path fill="#80C342" d="M93,47C93,21.595,72.405,1,47,1C34.297,1,22.797,6.149,14.473,14.473l65.054,65.054
+ C87.851,71.203,93,59.703,93,47z"/>
+ <g>
+ <path fill="#46A2DA" d="M47,65c-4.808,0-9.328-1.873-12.728-5.272c-7.018-7.019-7.018-18.438,0-25.456
+ C37.672,30.873,42.192,29,47,29s9.328,1.873,12.728,5.272c7.018,7.019,7.018,18.438,0,25.456C56.328,63.127,51.808,65,47,65z"/>
+ <path fill="#FFFFFF" d="M62.248,59.919c6.671-7.858,6.312-19.644-1.105-27.061C57.237,28.953,52.118,27,47,27
+ c-5.118,0-10.237,1.953-14.142,5.858c-7.81,7.81-7.81,20.474,0,28.284C36.763,65.047,41.882,67,47,67
+ c4.379,0,8.752-1.441,12.372-4.3L77.88,81.209c0.989-0.895,1.935-1.837,2.843-2.814L62.248,59.919z M35.686,58.314
+ c-6.238-6.238-6.238-16.389,0-22.627C38.708,32.664,42.726,31,47,31c4.274,0,8.292,1.664,11.314,4.686
+ c6.238,6.238,6.238,16.389,0,22.627C55.292,61.336,51.274,63,47,63C42.726,63,38.708,61.336,35.686,58.314z"/>
+ </g>
+</g>
+</svg>
diff --git a/examples/webenginewidgets/spellchecker/data/index.html b/examples/webenginewidgets/spellchecker/data/index.html
new file mode 100644
index 000000000..b6cec5fe0
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Contact us</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ </head>
+ <body>
+ <form class="form">
+ <img class="logo" src="icon.svg" alt="qtwebengine">
+ <div class="header">
+ <h1>Contact us</h1>
+ <h2>We are here to help</h2>
+ </div>
+ <label>
+ <span>First Name:</span><input id="firstname" type="text" name="name" />
+ </label>
+ <label>
+ <span>Last Name:</span><input id="lastName" type="text" name="name" />
+ </label>
+ <label>
+ <span>Email Address:</span><input id="email" type="text" name="email" />
+ </label>
+ <label>
+ <span>Subject:</span><input id="subject" type="text" name="subject" />
+ </label>
+ <label>
+ <span>Message:</span><textarea id="feedback" name="feedback"></textarea>
+ </label>
+ <input type="submit" value="Send" />
+ </form>
+ </body>
+</html>
diff --git a/examples/webenginewidgets/spellchecker/data/spellchecker.qrc b/examples/webenginewidgets/spellchecker/data/spellchecker.qrc
new file mode 100644
index 000000000..a9c76cc7e
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/spellchecker.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>index.html</file>
+ <file>style.css</file>
+ <file>icon.svg</file>
+ </qresource>
+</RCC>
diff --git a/examples/webenginewidgets/spellchecker/data/style.css b/examples/webenginewidgets/spellchecker/data/style.css
new file mode 100644
index 000000000..7b6736f1f
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/data/style.css
@@ -0,0 +1,90 @@
+.logo {
+ width: 50px;
+ height: 50px;
+ float: left;
+ margin: 20px 20px 0px 20px;
+ -webkit-animation:spin 8s linear infinite;
+}
+@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
+
+.header {
+ display: inline
+}
+
+.form {
+ width: 450px;
+ height: 600px;
+ background: -webkit-linear-gradient(bottom, #ddd, #fff);
+ border: 1px solid #999;
+ border-radius: 12px;
+ color: #46a;
+ font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
+ font-size: 14px;
+ font-style: italic;
+ font-weight: bold;
+ margin: auto;
+ padding: 10px;
+ position: relative;
+ line-height: 26px;
+ text-decoration: none;
+ -webkit-box-shadow: 0px 0px 5px #444;
+}
+
+h1 {
+ padding-left:40px;
+ color: #46a2da;
+}
+
+h2 {
+ color: #80c342;
+ font-size: 13px;
+ margin-top: -20px;
+}
+
+span {
+ margin-left: 20px;
+}
+
+input {
+ width: 400px;
+ display: block;
+ border: 1px solid #999;
+ height: 25px;
+ margin-left: 20px;
+ margin-bottom: 10px;
+ padding-left: 10px;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
+}
+
+textarea {
+ width: 400px;
+ max-width: 400px;
+ height: 180px;
+ max-height: 400px;
+ display: block;
+ margin-left: 20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
+}
+
+input:focus, textarea:focus {
+ outline:none;
+ border: 1px solid #46a2da;
+}
+
+input[type=submit] {
+ width: 100px;
+ left: 170px;
+ bottom: 10px;
+ background: #46a2da;
+ color: #fff;
+ height: 30px;
+ position: absolute;
+ border-radius: 14px;
+}
+
+input[type=submit]:hover {
+ background: #80c342;
+}
+
diff --git a/examples/webenginewidgets/spellchecker/dict/de/README.txt b/examples/webenginewidgets/spellchecker/dict/de/README.txt
new file mode 100644
index 000000000..f9c94e06d
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/de/README.txt
@@ -0,0 +1,20 @@
+This is dummy german dictionary which knows only following words:
+
+* ich
+* du
+* er
+* sie
+* es
+* wir
+* ihr
+* sie
+* Sie
+* liebe
+* liebst
+* liebt
+* lieben
+* liebt
+* qt
+
+Also each of words above can start with 'q' for example
+* qich
diff --git a/examples/webenginewidgets/spellchecker/dict/de/de-DE.aff b/examples/webenginewidgets/spellchecker/dict/de/de-DE.aff
new file mode 100644
index 000000000..ff8185771
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/de/de-DE.aff
@@ -0,0 +1,5 @@
+SET UTF-8
+TRY esianrtolcdugmphbyfvkwzqESIANRTOLCDUGMPHBYFVKWZQ
+
+PFX Q Y 1
+PFX Q 0 q .
diff --git a/examples/webenginewidgets/spellchecker/dict/de/de-DE.dic b/examples/webenginewidgets/spellchecker/dict/de/de-DE.dic
new file mode 100644
index 000000000..d10ae2600
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/de/de-DE.dic
@@ -0,0 +1,14 @@
+15
+du/Q
+er/Q
+es/Q
+ich/Q
+ihr/Q
+liebe/Q
+lieben/Q
+liebst/Q
+liebt/Q
+qt/Q
+sie/Q
+Sie/Q
+wir/Q
diff --git a/examples/webenginewidgets/spellchecker/dict/en/README.txt b/examples/webenginewidgets/spellchecker/dict/en/README.txt
new file mode 100644
index 000000000..41b529292
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/en/README.txt
@@ -0,0 +1,16 @@
+This is dummy english dictionary which knows only following words:
+
+* I
+* you
+* he
+* she
+* it
+* we
+* they
+* love
+* loves
+* qt
+
+Also each of words above can start with 'q' for example:
+
+* qI
diff --git a/examples/webenginewidgets/spellchecker/dict/en/en-US.aff b/examples/webenginewidgets/spellchecker/dict/en/en-US.aff
new file mode 100644
index 000000000..ff8185771
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/en/en-US.aff
@@ -0,0 +1,5 @@
+SET UTF-8
+TRY esianrtolcdugmphbyfvkwzqESIANRTOLCDUGMPHBYFVKWZQ
+
+PFX Q Y 1
+PFX Q 0 q .
diff --git a/examples/webenginewidgets/spellchecker/dict/en/en-US.dic b/examples/webenginewidgets/spellchecker/dict/en/en-US.dic
new file mode 100644
index 000000000..3d4ecdfa4
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/dict/en/en-US.dic
@@ -0,0 +1,11 @@
+10
+he/Q
+I/Q
+it/Q
+love/Q
+loves/Q
+qt/Q
+she/Q
+they/Q
+we/Q
+you/Q
diff --git a/examples/webenginewidgets/spellchecker/doc/images/spellchecker-example.png b/examples/webenginewidgets/spellchecker/doc/images/spellchecker-example.png
new file mode 100644
index 000000000..cc4e74946
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/doc/images/spellchecker-example.png
Binary files differ
diff --git a/examples/webenginewidgets/spellchecker/doc/src/spellchecker.qdoc b/examples/webenginewidgets/spellchecker/doc/src/spellchecker.qdoc
new file mode 100644
index 000000000..b0240cd4d
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/doc/src/spellchecker.qdoc
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webenginewidgets/spellchecker
+ \title WebEngine Widgets Spellchecker Example
+ \ingroup webengine-widgetexamples
+ \brief Integrates a spellchecker into a simple HTML form.
+
+ \image spellchecker-example.png
+
+ \e {Spellchecker} demonstrates how to integrate spellchecking support into
+ an HTML form that enables users to submit spellchecked messages.
+
+ \include examples-run.qdocinc
+
+ \section1 Dictionaries
+
+ To be able to check the spelling, we need to provide the spellchecker with
+ dictionaries. The Qt WebEngine spellchecker supports dictionaries provided by the
+ \l {Hunspell project} on all platforms and native dictionaries provided by macOS.
+ In this example, we want to support the English and German languages.
+
+ For Hunspell dictionaries to be supported they have to be compiled into a special binary format.
+ A Hunspell dictionary consists of two files:
+
+ \list
+
+ \li A \c .dic file that is a dictionary containing words for the
+ language
+ \li An \c .aff file that defines the meaning of special flags in the
+ dictionary
+ \endlist
+
+ These two files can be converted into the \c bdic format by using the
+ \c qwebengine_convert_dict tool that is shipped together with Qt.
+
+ In this example, we are going to compile en_US and de_DE dictionaries.
+ However, the real full dictionaries would take too much space for the
+ purposes of this example. Therefore, we have created two dummy dictionaries
+ that contain the following words and can be used to demonstrate the
+ conversion process:
+
+ \list
+ \li English dictionary: I, you, he, she, it, we, they, love, loves, qt
+ \li German dictionary: ich, du, er, sie, es, wir, ihr, sie, Sie, liebe,
+ liebst, liebt, lieben, liebt, qt
+ \endlist
+
+ Each word in a dictionary can be prefixed with \c q. For more information
+ about how to create \c dic and \c aff files, see the Hunspell dictionary
+ file format specification in the \l{Hunspell Project}.
+
+ When a specific spellchecking language is requested, Qt WebEngine will try
+ to load the already compiled matching \c .bdic file first from
+ \e qtwebengine_dictionaries directories relative to the executable,
+ then it will look in \c QT_INSTALL_PREFIX/qtwebengine_dictionaries.
+
+ On macOS, because this example was configured to use Hunspell dictionaries, Qt WebEngine will
+ look in the \e qtwebengine_dictionaries directory located inside the application bundle
+ \c Resources directory, and also in the \c Resources directory located inside the
+ Qt framework bundle.
+
+ We specify the QMAKE_EXTRA_COMPILERS parameter in the project file to add a
+ conversion step to the build process:
+
+ \quotefromfile webenginewidgets/spellchecker/spellchecker.pro
+ \skipto CONVERT_TOOL
+ \printuntil QMAKE_EXTRA_COMPILERS
+
+ To set up a dictionary, we run \c qwebengine_convert_dict passing the
+ file path of the dictionary \c dic and \c bdic files. The \c aff file and
+ optional \c delta file are also picked up by the \c convert process.
+ The output \c bdic file is placed into the \e qtwebengine_dictionaries local
+ directory (or Resources directory), which the application binary will run from.
+
+ \section1 Setting the Spellchecker
+
+ The constructor of our class is trivial.
+
+ \quotefromfile webenginewidgets/spellchecker/webview.cpp
+ \skipto WebView::WebView
+ \printuntil }
+ We define simple mapping between our dictionary filenames and
+ the actual language display name. We will use that mapping to display names
+ of dictionaries in the context menu. Spellchecking is disabled by default.
+ Therefore we also enable spellchecker and set the \e English dictionary.
+ When Qt WebEngine's spellcheck service initializes, it will try to load the
+ \c bdict dictionaries and to check them for consistency.
+ Any errors are logged by using the qWarning() function.
+
+ \section1 Switching the Spellchecking Language
+
+ The current language used for spellchecking is defined per profile, and can
+ get set using the QWebEngineProfile::setSpellCheckLanguage method. When the
+ user clicks on an underlined misspelled word, the default context menu
+ displays up to four suggestions. Selecting one will replace the misspelled
+ word. We could reimplement a number of suggestions, by overriding
+ QWebEngineView::contextMenuEvent and using
+ QWebEngineContextMenuData::spellCheckerSuggestions, but we will demonstrate
+ how to add langague options in the context menu instead:
+
+ \quotefromfile webenginewidgets/spellchecker/webview.cpp
+ \skipto void WebView::contextMenuEvent
+ \printuntil menu->popup
+ \printline }
+
+ Above, we get the QWebEngineContextMenuData instance using the
+ QWebEnginePage::contextMenuData method. We use it to be notified when the
+ user clicks on an editable field and show the \uicontrol {Check Spelling}
+ item in the context menu. Moreover, if spellchecking is enabled, we also
+ add the \uicontrol {Select Language} submenu with the supported languages.
+ When an action is triggered, we set the language with the
+ QWebEngineProfile::setSpellCheckLanguage call.
+*/
diff --git a/examples/webenginewidgets/spellchecker/main.cpp b/examples/webenginewidgets/spellchecker/main.cpp
new file mode 100644
index 000000000..0d411f665
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "webview.h"
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ WebView view;
+ view.setUrl(QUrl(QStringLiteral("qrc:/index.html")));
+ view.resize(500, 640);
+ view.show();
+
+ return app.exec();
+}
diff --git a/examples/webenginewidgets/spellchecker/spellchecker.pro b/examples/webenginewidgets/spellchecker/spellchecker.pro
new file mode 100644
index 000000000..c6031a36d
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/spellchecker.pro
@@ -0,0 +1,63 @@
+TEMPLATE = app
+TARGET = spellchecker
+QT += webenginewidgets
+CONFIG += c++11
+
+contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+ error("Spellcheck example can not be built when using native OS dictionaries.")
+}
+
+HEADERS += \
+ webview.h
+
+SOURCES += \
+ main.cpp \
+ webview.cpp
+
+RESOURCES += \
+ data/spellchecker.qrc
+
+DISTFILES += \
+ dict/en/README.txt \
+ dict/en/en-US.dic \
+ dict/en/en-US.aff \
+ dict/de/README.txt \
+ dict/de/de-DE.dic \
+ dict/de/de-DE.aff
+
+target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/spellchecker
+INSTALLS += target
+
+qtPrepareTool(CONVERT_TOOL, qwebengine_convert_dict)
+
+debug_and_release {
+ CONFIG(debug, debug|release): DICTIONARIES_DIR = debug/qtwebengine_dictionaries
+ else: DICTIONARIES_DIR = release/qtwebengine_dictionaries
+} else {
+ DICTIONARIES_DIR = qtwebengine_dictionaries
+}
+
+dict_base_paths = en/en-US de/de-DE
+for (base_path, dict_base_paths) {
+ dict.files += $$PWD/dict/$${base_path}.dic
+}
+
+dictoolbuild.input = dict.files
+dictoolbuild.output = $${DICTIONARIES_DIR}/${QMAKE_FILE_BASE}.bdic
+dictoolbuild.depends = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.aff
+dictoolbuild.commands = $${CONVERT_TOOL} ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+dictoolbuild.name = Build ${QMAKE_FILE_IN_BASE}
+dictoolbuild.CONFIG = no_link target_predeps
+QMAKE_EXTRA_COMPILERS += dictoolbuild
+
+# When the example is compiled as a bundle, WebEngine expects to find the dictionaries in
+# bundle.app/Contents/Resources/qtwebengine_dictionaries
+macos:app_bundle {
+ for (base_path, dict_base_paths) {
+ base_path_splitted = $$split(base_path, /)
+ base_name = $$last(base_path_splitted)
+ binary_dict_files.files += $${DICTIONARIES_DIR}/$${base_name}.bdic
+ }
+ binary_dict_files.path = Contents/Resources/$$DICTIONARIES_DIR
+ QMAKE_BUNDLE_DATA += binary_dict_files
+}
diff --git a/examples/webenginewidgets/spellchecker/webview.cpp b/examples/webenginewidgets/spellchecker/webview.cpp
new file mode 100644
index 000000000..86e21ab13
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/webview.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "webview.h"
+#include <QContextMenuEvent>
+#include <QMenu>
+#include <QWebEngineProfile>
+#include <QWebEngineContextMenuData>
+
+WebView::WebView(QWidget *parent)
+ : QWebEngineView(parent)
+{
+ m_spellCheckLanguages["English"] = "en-US";
+ m_spellCheckLanguages["German"] = "de-DE";
+ QWebEngineProfile *profile = page()->profile();
+ profile->setSpellCheckEnabled(true);
+ profile->setSpellCheckLanguages({"en-US"});
+}
+
+void WebView::contextMenuEvent(QContextMenuEvent *event)
+{
+ const QWebEngineContextMenuData &data = page()->contextMenuData();
+ Q_ASSERT(data.isValid());
+
+ if (!data.isContentEditable()) {
+ QWebEngineView::contextMenuEvent(event);
+ return;
+ }
+
+ QWebEngineProfile *profile = page()->profile();
+ const QString &language = profile->spellCheckLanguages().first();
+ QMenu *menu = page()->createStandardContextMenu();
+ menu->addSeparator();
+
+ QAction *spellcheckAction = new QAction(tr("Check Spelling"));
+ spellcheckAction->setCheckable(true);
+ spellcheckAction->setChecked(profile->isSpellCheckEnabled());
+ connect(spellcheckAction, &QAction::toggled, this, [profile](bool toogled) {
+ profile->setSpellCheckEnabled(toogled);
+ });
+ menu->addAction(spellcheckAction);
+
+ if (profile->isSpellCheckEnabled()) {
+ QMenu *subMenu = menu->addMenu(tr("Select Language"));
+ foreach (const QString &str, m_spellCheckLanguages.keys()) {
+ QAction *action = subMenu->addAction(str);
+ action->setCheckable(true);
+ QString lang = m_spellCheckLanguages[str];
+ action->setChecked(language == lang);
+ connect(action, &QAction::triggered, this, [profile, lang](){
+ profile->setSpellCheckLanguages(QStringList()<<lang);
+ });
+ }
+ }
+ connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
+ menu->popup(event->globalPos());
+}
+
+
diff --git a/examples/webenginewidgets/spellchecker/webview.h b/examples/webenginewidgets/spellchecker/webview.h
new file mode 100644
index 000000000..787d06a1a
--- /dev/null
+++ b/examples/webenginewidgets/spellchecker/webview.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WEBVIEW_H
+#define WEBVIEW_H
+
+#include <QWebEngineView>
+
+class WebView : public QWebEngineView
+{
+ Q_OBJECT
+
+public:
+ WebView(QWidget *parent = nullptr);
+
+protected:
+ void contextMenuEvent(QContextMenuEvent *event) override;
+
+private:
+ QMap<QString,QString> m_spellCheckLanguages;
+};
+
+#endif
diff --git a/qtwebengine.pro b/qtwebengine.pro
index 3d20cc2f4..3fd5c12e6 100644
--- a/qtwebengine.pro
+++ b/qtwebengine.pro
@@ -1,6 +1,19 @@
load(qt_build_config)
load(qt_parts)
+isPlatformSupported() {
+ !exists(src/3rdparty/chromium): \
+ error("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
+ load(configure)
+ runConfigure()
+}
+
+!isEmpty(skipBuildReason) {
+ SUBDIRS =
+ log($${skipBuildReason}$${EOL})
+ log(QtWebEngine will not be built.$${EOL})
+}
+
OTHER_FILES = \
tools/buildscripts/* \
tools/scripts/* \
diff --git a/src/3rdparty b/src/3rdparty
-Subproject b3c79e92f0a631273b639af171e59f4c367ae02
+Subproject 93b3786290ac16c95f15c95e2c2f3d8254171ab
diff --git a/src/core/access_token_store_qt.cpp b/src/core/access_token_store_qt.cpp
index 6c4cbc610..5b8fe83f7 100644
--- a/src/core/access_token_store_qt.cpp
+++ b/src/core/access_token_store_qt.cpp
@@ -47,6 +47,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "browser_context_qt.h"
#include "browser_context_adapter.h"
@@ -67,7 +68,7 @@ AccessTokenStoreQt::~AccessTokenStoreQt()
{
}
-void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallbackType& callback)
+void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallback& callback)
{
BrowserThread::PostTaskAndReply(BrowserThread::UI, FROM_HERE
, base::Bind(&AccessTokenStoreQt::performWorkOnUIThread, this)
@@ -76,10 +77,10 @@ void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallbackType& ca
void AccessTokenStoreQt::performWorkOnUIThread()
{
- m_systemRequestContext = WebEngineContext::current()->defaultBrowserContext()->browserContext()->GetRequestContext();
+ m_systemRequestContext = content::BrowserContext::GetDefaultStoragePartition(WebEngineContext::current()->defaultBrowserContext()->browserContext())->GetURLRequestContext();
}
-void AccessTokenStoreQt::respondOnOriginatingThread(const LoadAccessTokensCallbackType& callback)
+void AccessTokenStoreQt::respondOnOriginatingThread(const LoadAccessTokensCallback& callback)
{
callback.Run(m_accessTokenSet, m_systemRequestContext);
m_systemRequestContext = 0;
diff --git a/src/core/access_token_store_qt.h b/src/core/access_token_store_qt.h
index 0f45fd3a0..973f304c0 100644
--- a/src/core/access_token_store_qt.h
+++ b/src/core/access_token_store_qt.h
@@ -58,16 +58,16 @@ public:
AccessTokenStoreQt();
~AccessTokenStoreQt();
- virtual void LoadAccessTokens(const LoadAccessTokensCallbackType& request) Q_DECL_OVERRIDE;
+ virtual void LoadAccessTokens(const LoadAccessTokensCallback& request) Q_DECL_OVERRIDE;
virtual void SaveAccessToken(const GURL& serverUrl, const base::string16& accessToken) Q_DECL_OVERRIDE;
private:
void performWorkOnUIThread();
- void respondOnOriginatingThread(const LoadAccessTokensCallbackType& callback);
+ void respondOnOriginatingThread(const LoadAccessTokensCallback& callback);
net::URLRequestContextGetter *m_systemRequestContext;
- AccessTokenSet m_accessTokenSet;
+ AccessTokenMap m_accessTokenSet;
DISALLOW_COPY_AND_ASSIGN(AccessTokenStoreQt);
};
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index 6e2d606b2..37f8885bb 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -15,9 +15,7 @@ CONFIG -= create_prl
# Copy this logic from qt_module.prf so that the intermediate library can be
# created to the same rules as the final module linking in core_module.pro.
!host_build:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
- contains(QT_CONFIG, build_all):CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release build_all
}
DEFINES += \
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp
index f5d1e6d39..072f27967 100644
--- a/src/core/api/qtwebenginecoreglobal.cpp
+++ b/src/core/api/qtwebenginecoreglobal.cpp
@@ -40,16 +40,20 @@
#include "qtwebenginecoreglobal_p.h"
#include <QGuiApplication>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <QThread>
+#ifndef QT_NO_OPENGL
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context);
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace QtWebEngineCore {
-
+#ifndef QT_NO_OPENGL
static QOpenGLContext *shareContext;
static void deleteShareContext()
@@ -58,6 +62,7 @@ static void deleteShareContext()
shareContext = 0;
}
+#endif
// ### Qt 6: unify this logic and Qt::AA_ShareOpenGLContexts.
// QtWebEngine::initialize was introduced first and meant to be called
// after the QGuiApplication creation, when AA_ShareOpenGLContexts fills
@@ -65,6 +70,7 @@ static void deleteShareContext()
QWEBENGINE_PRIVATE_EXPORT void initialize()
{
+#ifndef QT_NO_OPENGL
#ifdef Q_OS_WIN32
qputenv("QT_D3DCREATE_MULTITHREADED", "1");
#endif
@@ -100,5 +106,6 @@ QWEBENGINE_PRIVATE_EXPORT void initialize()
// Classes like QOpenGLWidget check for the attribute
app->setAttribute(Qt::AA_ShareOpenGLContexts);
+#endif // QT_NO_OPENGL
}
} // namespace QtWebEngineCore
diff --git a/src/core/authentication_dialog_controller_p.h b/src/core/authentication_dialog_controller_p.h
index 2acc588e1..af5d92530 100644
--- a/src/core/authentication_dialog_controller_p.h
+++ b/src/core/authentication_dialog_controller_p.h
@@ -41,7 +41,8 @@
#define AUTHENTICATION_DIALOG_CONTROLLER_P_H
#include "base/memory/ref_counted.h"
-#include "resource_dispatcher_host_delegate_qt.h"
+
+#include "renderer_host/resource_dispatcher_host_delegate_qt.h"
namespace QtWebEngineCore {
diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
index bd3c5e7d9..730786bbd 100644
--- a/src/core/browser_accessibility_manager_qt.cpp
+++ b/src/core/browser_accessibility_manager_qt.cpp
@@ -82,8 +82,9 @@ QAccessibleInterface *BrowserAccessibilityManagerQt::rootParentAccessible()
return QAccessible::queryAccessibleInterface(m_parentObject);
}
-void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_type,
- BrowserAccessibility* node)
+void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node)
{
BrowserAccessibilityQt *iface = static_cast<BrowserAccessibilityQt*>(node);
diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h
index 4ff9fb699..da50de9cb 100644
--- a/src/core/browser_accessibility_manager_qt.h
+++ b/src/core/browser_accessibility_manager_qt.h
@@ -59,15 +59,14 @@ public:
class BrowserAccessibilityManagerQt : public BrowserAccessibilityManager
{
public:
- BrowserAccessibilityManagerQt(
- QObject* parentObject,
- const ui::AXTreeUpdate& initialTree,
- BrowserAccessibilityDelegate* delegate,
- BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
+ BrowserAccessibilityManagerQt(QObject* parentObject,
+ const ui::AXTreeUpdate& initialTree,
+ BrowserAccessibilityDelegate* delegate,
+ BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
- void NotifyAccessibilityEvent(
- ui::AXEvent event_type,
- BrowserAccessibility* node) Q_DECL_OVERRIDE;
+ void NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node) Q_DECL_OVERRIDE;
QAccessibleInterface *rootParentAccessible();
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index fecbac111..30e6efc2e 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -418,7 +418,7 @@ QAccessible::State BrowserAccessibilityQt::state() const
state.expanded = true;
if (s & (1 << ui::AX_STATE_FOCUSABLE))
state.focusable = true;
- if (s & (1 << ui::AX_STATE_FOCUSED))
+ if (manager()->GetFocus() == this)
state.focused = true;
if (s & (1 << ui::AX_STATE_HASPOPUP))
state.hasPopup = true;
@@ -480,7 +480,7 @@ QStringList BrowserAccessibilityQt::actionNames() const
void BrowserAccessibilityQt::doAction(const QString &actionName)
{
if (actionName == QAccessibleActionInterface::setFocusAction())
- manager()->SetFocus(this, true);
+ manager()->SetFocus(*this);
}
QStringList BrowserAccessibilityQt::keyBindingsForAction(const QString &actionName) const
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 24e2dc2c2..3396f73ef 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -41,17 +41,21 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_thread.h"
+
#include "browser_context_qt.h"
#include "content_client_qt.h"
#include "download_manager_delegate_qt.h"
#include "permission_manager_qt.h"
+#include "type_conversion.h"
#include "web_engine_context.h"
#include "web_engine_visited_links_manager.h"
#include "url_request_context_getter_qt.h"
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "net/proxy/proxy_service.h"
+#include "components/keyed_service/content/browser_context_dependency_manager.h"
+
#include <QCoreApplication>
#include <QDir>
#include <QString>
@@ -78,6 +82,8 @@ BrowserContextAdapter::BrowserContextAdapter(bool offTheRecord)
, m_visitedLinksPolicy(TrackVisitedLinksOnDisk)
, m_httpCacheMaxSize(0)
{
+ WebEngineContext::current(); // Ensure the WebEngineContext has been initialized
+ content::BrowserContext::Initialize(m_browserContext.data(), toFilePath(dataPath()));
}
BrowserContextAdapter::BrowserContextAdapter(const QString &storageName)
@@ -89,12 +95,15 @@ BrowserContextAdapter::BrowserContextAdapter(const QString &storageName)
, m_visitedLinksPolicy(TrackVisitedLinksOnDisk)
, m_httpCacheMaxSize(0)
{
+ WebEngineContext::current(); // Ensure the WebEngineContext has been initialized
+ content::BrowserContext::Initialize(m_browserContext.data(), toFilePath(dataPath()));
}
BrowserContextAdapter::~BrowserContextAdapter()
{
if (m_downloadManagerDelegate)
content::BrowserThread::DeleteSoon(content::BrowserThread::UI, FROM_HERE, m_downloadManagerDelegate.take());
+ BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(m_browserContext.data());
}
void BrowserContextAdapter::setStorageName(const QString &storageName)
@@ -482,19 +491,19 @@ void BrowserContextAdapter::clearHttpCache()
m_browserContext->url_request_getter_->clearHttpCache();
}
-void BrowserContextAdapter::setSpellCheckLanguage(const QString &language)
+void BrowserContextAdapter::setSpellCheckLanguages(const QStringList &languages)
{
#if defined(ENABLE_SPELLCHECK)
- m_browserContext->setSpellCheckLanguage(language);
+ m_browserContext->setSpellCheckLanguages(languages);
#endif
}
-QString BrowserContextAdapter::spellCheckLanguage() const
+QStringList BrowserContextAdapter::spellCheckLanguages() const
{
#if defined(ENABLE_SPELLCHECK)
- return m_browserContext->spellCheckLanguage();
+ return m_browserContext->spellCheckLanguages();
#else
- return QString();
+ return QStringList();
#endif
}
diff --git a/src/core/browser_context_adapter.h b/src/core/browser_context_adapter.h
index a6e5a2a3e..39b9db61c 100644
--- a/src/core/browser_context_adapter.h
+++ b/src/core/browser_context_adapter.h
@@ -108,9 +108,8 @@ public:
QString httpUserAgent() const;
void setHttpUserAgent(const QString &userAgent);
- QStringList spellCheckLanguages(const QStringList &acceptLanguages);
- void setSpellCheckLanguage(const QString &language);
- QString spellCheckLanguage() const;
+ void setSpellCheckLanguages(const QStringList &language);
+ QStringList spellCheckLanguages() const;
void setSpellCheckEnabled(bool enabled);
bool isSpellCheckEnabled() const;
diff --git a/src/core/browser_context_adapter_client.h b/src/core/browser_context_adapter_client.h
index 2df8c21cb..faba08591 100644
--- a/src/core/browser_context_adapter_client.h
+++ b/src/core/browser_context_adapter_client.h
@@ -69,6 +69,13 @@ public:
MimeHtmlSaveFormat
};
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+
struct DownloadItemInfo {
const quint32 id;
const QUrl url;
@@ -80,6 +87,7 @@ public:
QString path;
int savePageFormat;
bool accepted;
+ int downloadType;
};
virtual ~BrowserContextAdapterClient() { }
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 1c326fb83..a6801e1d7 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -54,31 +54,31 @@
#include "content/public/browser/storage_partition.h"
#include "net/proxy/proxy_config_service.h"
-#if defined(ENABLE_SPELLCHECK)
#include "base/base_paths.h"
-#include "base/prefs/pref_member.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/testing_pref_store.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/pref_service_factory.h"
-#include "base/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_member.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/testing_pref_store.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_service_factory.h"
+#include "components/prefs/pref_registry_simple.h"
#include "components/user_prefs/user_prefs.h"
+#if defined(ENABLE_SPELLCHECK)
#include "chrome/common/pref_names.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#endif
namespace QtWebEngineCore {
-#if defined(ENABLE_SPELLCHECK)
BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
: m_adapter(adapter),
m_prefStore(new TestingPrefStore())
{
m_prefStore->SetInitializationCompleted();
- base::PrefServiceFactory factory;
+ PrefServiceFactory factory;
factory.set_user_prefs(m_prefStore);
scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple());
+#if defined(ENABLE_SPELLCHECK)
// Initial spellcheck settings
registry->RegisterListPref(prefs::kSpellCheckDictionaries, new base::ListValue());
registry->RegisterStringPref(prefs::kAcceptLanguages, std::string());
@@ -86,15 +86,10 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false);
registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, false);
registry->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, false);
+#endif //ENABLE_SPELLCHECK
m_prefService = factory.Create(std::move(registry.get()));
user_prefs::UserPrefs::Set(this, m_prefService.get());
}
-#else
-BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
- : m_adapter(adapter)
-{
-}
-#endif //ENABLE_SPELLCHECK
BrowserContextQt::~BrowserContextQt()
{
@@ -102,6 +97,16 @@ BrowserContextQt::~BrowserContextQt()
content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, resourceContext.release());
}
+PrefService* BrowserContextQt::GetPrefs()
+{
+ return m_prefService.get();
+}
+
+const PrefService* BrowserContextQt::GetPrefs() const
+{
+ return m_prefService.get();
+}
+
base::FilePath BrowserContextQt::GetPath() const
{
return toFilePath(m_adapter->dataPath());
@@ -122,24 +127,15 @@ net::URLRequestContextGetter *BrowserContextQt::GetRequestContext()
return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetRequestContextForRenderProcess(int)
-{
- return GetRequestContext();
-}
-
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContext()
-{
- return GetRequestContext();
-}
-
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForRenderProcess(int)
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContext()
{
- return GetRequestContext();
+ return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForStoragePartition(const base::FilePath&, bool)
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool)
{
- return GetRequestContext();
+ Q_UNIMPLEMENTED();
+ return nullptr;
}
content::ResourceContext *BrowserContextQt::GetResourceContext()
@@ -177,7 +173,7 @@ content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
return sslHostStateDelegate.get();
}
-scoped_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
+std::unique_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
{
return nullptr;
}
@@ -200,6 +196,15 @@ net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::Pr
return url_request_getter_.get();
}
+net::URLRequestContextGetter *BrowserContextQt::CreateRequestContextForStoragePartition(
+ const base::FilePath& partition_path, bool in_memory,
+ content::ProtocolHandlerMap* protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors)
+{
+ Q_UNIMPLEMENTED();
+ return nullptr;
+}
+
#if defined(ENABLE_SPELLCHECK)
void BrowserContextQt::failedToLoadDictionary(const std::string &language)
{
@@ -208,18 +213,27 @@ void BrowserContextQt::failedToLoadDictionary(const std::string &language)
<< "Make sure that correct bdic file is in:" << toQt(WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES).value());
}
-void BrowserContextQt::setSpellCheckLanguage(const QString &language)
+void BrowserContextQt::setSpellCheckLanguages(const QStringList &languages)
{
- base::ListValue dictionaries;
- dictionaries.AppendString(language.toStdString());
- m_prefService->Set(prefs::kSpellCheckDictionaries, dictionaries);
+ StringListPrefMember dictionaries_pref;
+ dictionaries_pref.Init(prefs::kSpellCheckDictionaries, m_prefService.get());
+ std::vector<std::string> dictionaries;
+ dictionaries.reserve(languages.size());
+ for (const auto &language : languages)
+ dictionaries.push_back(language.toStdString());
+ dictionaries_pref.SetValue(dictionaries);
}
-QString BrowserContextQt::spellCheckLanguage() const
+QStringList BrowserContextQt::spellCheckLanguages() const
{
- std::string dictionary;
- m_prefService->GetList(prefs::kSpellCheckDictionaries)->GetString(0, &dictionary);
- return QString::fromStdString(dictionary);
+ QStringList spellcheck_dictionaries;
+ for (const auto &value : *m_prefService->GetList(prefs::kSpellCheckDictionaries)) {
+ std::string dictionary;
+ if (value->GetAsString(&dictionary))
+ spellcheck_dictionaries.append(QString::fromStdString(dictionary));
+ }
+
+ return spellcheck_dictionaries;
}
void BrowserContextQt::setSpellCheckEnabled(bool enabled)
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index e2156f147..ca65552be 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -40,20 +40,18 @@
#ifndef BROWSER_CONTEXT_QT_H
#define BROWSER_CONTEXT_QT_H
-#include "content/public/browser/browser_context.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
#include "net/url_request/url_request_context.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
-#if defined(ENABLE_SPELLCHECK)
QT_BEGIN_NAMESPACE
class QStringList;
QT_END_NAMESPACE
class TestingPrefStore;
class PrefService;
-#endif
namespace QtWebEngineCore {
@@ -62,39 +60,50 @@ class PermissionManagerQt;
class SSLHostStateDelegateQt;
class URLRequestContextGetterQt;
-class BrowserContextQt : public content::BrowserContext
+class BrowserContextQt : public Profile
{
public:
explicit BrowserContextQt(BrowserContextAdapter *);
virtual ~BrowserContextQt();
+ // BrowserContext implementation:
virtual base::FilePath GetPath() const Q_DECL_OVERRIDE;
base::FilePath GetCachePath() const;
virtual bool IsOffTheRecord() const Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetRequestContextForRenderProcess(int) Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForRenderProcess(int) Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForStoragePartition(const base::FilePath&, bool) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter *GetRequestContext();
+
+ virtual net::URLRequestContextGetter *CreateMediaRequestContext() Q_DECL_OVERRIDE;
+ virtual net::URLRequestContextGetter *CreateMediaRequestContextForStoragePartition(const base::FilePath& partition_path, bool in_memory) Q_DECL_OVERRIDE;
+
virtual content::ResourceContext *GetResourceContext() Q_DECL_OVERRIDE;
virtual content::DownloadManagerDelegate *GetDownloadManagerDelegate() Q_DECL_OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() Q_DECL_OVERRIDE;
virtual storage::SpecialStoragePolicy *GetSpecialStoragePolicy() Q_DECL_OVERRIDE;
virtual content::PushMessagingService* GetPushMessagingService() Q_DECL_OVERRIDE;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() Q_DECL_OVERRIDE;
- net::URLRequestContextGetter *CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors);
- virtual scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter *CreateRequestContext(
+ content::ProtocolHandlerMap *protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
+ const base::FilePath& partition_path, bool in_memory,
+ content::ProtocolHandlerMap* protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors) Q_DECL_OVERRIDE;
+ virtual std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
virtual content::PermissionManager *GetPermissionManager() Q_DECL_OVERRIDE;
virtual content::BackgroundSyncController* GetBackgroundSyncController() Q_DECL_OVERRIDE;
+ // Profile implementation:
+ PrefService* GetPrefs() override;
+ const PrefService* GetPrefs() const override;
+
BrowserContextAdapter *adapter() { return m_adapter; }
#if defined(ENABLE_SPELLCHECK)
void failedToLoadDictionary(const std::string& language) override;
- void setSpellCheckLanguage(const QString &language);
- QString spellCheckLanguage() const;
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
void setSpellCheckEnabled(bool enabled);
bool isSpellCheckEnabled() const;
#endif
@@ -102,15 +111,13 @@ public:
private:
friend class ContentBrowserClientQt;
friend class WebContentsAdapter;
- scoped_ptr<content::ResourceContext> resourceContext;
+ std::unique_ptr<content::ResourceContext> resourceContext;
scoped_refptr<URLRequestContextGetterQt> url_request_getter_;
- scoped_ptr<PermissionManagerQt> permissionManager;
- scoped_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
+ std::unique_ptr<PermissionManagerQt> permissionManager;
+ std::unique_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
BrowserContextAdapter *m_adapter;
-#if defined(ENABLE_SPELLCHECK)
scoped_refptr<TestingPrefStore> m_prefStore;
- scoped_ptr<PrefService> m_prefService;
-#endif
+ std::unique_ptr<PrefService> m_prefService;
friend class BrowserContextAdapter;
DISALLOW_COPY_AND_ASSIGN(BrowserContextQt);
diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp
index 65bba733a..18835a5c7 100644
--- a/src/core/certificate_error_controller.cpp
+++ b/src/core/certificate_error_controller.cpp
@@ -66,6 +66,7 @@ ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNonUniqueName, net::ER
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateWeakKey, net::ERR_CERT_WEAK_KEY)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNameConstraintViolation, net::ERR_CERT_NAME_CONSTRAINT_VIOLATION)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateValidityTooLong, net::ERR_CERT_VALIDITY_TOO_LONG)
+ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateTransparencyRequired, net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateErrorEnd, net::ERR_CERT_END)
void CertificateErrorControllerPrivate::accept(bool accepted)
@@ -174,6 +175,8 @@ QString CertificateErrorController::errorString() const
return getQStringForMessageId(IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION);
case CertificateValidityTooLong:
return getQStringForMessageId(IDS_CERT_ERROR_VALIDITY_TOO_LONG_DESCRIPTION);
+ case CertificateTransparencyRequired:
+ return getQStringForMessageId(IDS_CERT_ERROR_CERTIFICATE_TRANSPARENCY_REQUIRED_DESCRIPTION);
case CertificateUnableToCheckRevocation: // Deprecated in Chromium.
default:
break;
diff --git a/src/core/certificate_error_controller.h b/src/core/certificate_error_controller.h
index 27f18946f..554281644 100644
--- a/src/core/certificate_error_controller.h
+++ b/src/core/certificate_error_controller.h
@@ -71,8 +71,9 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
- CertificateErrorEnd = -214 // not an error, just an enum boundary
+ CertificateErrorEnd = -215 // not an error, just an enum boundary
};
CertificateError error() const;
diff --git a/src/core/chrome_qt.gyp b/src/core/chrome_qt.gyp
index f2d7c5831..89f1fe188 100644
--- a/src/core/chrome_qt.gyp
+++ b/src/core/chrome_qt.gyp
@@ -2,8 +2,6 @@
'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
'chrome_spellchecker_sources': [
- '<(DEPTH)/base/prefs/testing_pref_store.cc',
- '<(DEPTH)/base/prefs/testing_pref_store.h',
'<(DEPTH)/chrome/browser/spellchecker/feedback.cc',
'<(DEPTH)/chrome/browser/spellchecker/feedback.h',
'<(DEPTH)/chrome/browser/spellchecker/feedback_sender.cc',
@@ -63,6 +61,7 @@
'type': 'static_library',
'dependencies': [
'chrome_resources',
+ '<(chromium_src_dir)/components/components_resources.gyp:components_resources',
'<(chromium_src_dir)/components/components_strings.gyp:components_strings',
],
'include_dirs': [
@@ -70,43 +69,60 @@
'<(chromium_src_dir)',
'<(chromium_src_dir)/skia/config',
'<(chromium_src_dir)/third_party/skia/include/core',
- # Needed to include grit-generated files in localized_error.cc:
- '<(SHARED_INTERMEDIATE_DIR)/chrome',
- '<(SHARED_INTERMEDIATE_DIR)/components/strings',
],
'sources': [
'<(DEPTH)/chrome/browser/media/desktop_media_list.h',
'<(DEPTH)/chrome/browser/media/desktop_streams_registry.cc',
'<(DEPTH)/chrome/browser/media/desktop_streams_registry.h',
+ '<(DEPTH)/chrome/browser/profiles/profile.cc',
+ '<(DEPTH)/chrome/browser/profiles/profile.h',
'<(DEPTH)/chrome/common/chrome_switches.cc',
'<(DEPTH)/chrome/common/chrome_switches.h',
- '<(DEPTH)/chrome/common/localized_error.cc',
- '<(DEPTH)/chrome/common/localized_error.h',
+ '<(DEPTH)/components/prefs/testing_pref_store.cc',
+ '<(DEPTH)/components/prefs/testing_pref_store.h',
+ '<(DEPTH)/extensions/common/constants.cc',
+ '<(DEPTH)/extensions/common/constants.h',
+ '<(DEPTH)/extensions/common/url_pattern.cc',
+ '<(DEPTH)/extensions/common/url_pattern.h',
],
'conditions': [
+ ['OS == "win"', {
+ # crbug.com/167187 fix size_t to int truncations
+ 'msvs_disabled_warnings': [4267, ],
+ }],
+ ['enable_plugins==1', {
+ 'sources': [
+ '<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc',
+ '<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.cc',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.h',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_shared_memory_message_filter.h',
+ ],
+ }],
+ ['enable_pdf==1', {
+ 'dependencies': [
+ '<(chromium_src_dir)/pdf/pdf.gyp:pdf',
+ '<(chromium_src_dir)/components/components.gyp:pdf_renderer',
+ '<(chromium_src_dir)/components/components.gyp:pdf_browser',
+ ],
+ }],
['enable_spellcheck==1', {
'sources': [ '<@(chrome_spellchecker_sources)' ],
'include_dirs': [
- '<(chromium_src_dir)/third_party/WebKit',
+ '<(chromium_src_dir)/third_party/WebKit',
],
'dependencies': [
- '<(chromium_src_dir)/components/components.gyp:keyed_service_content',
- '<(chromium_src_dir)/components/components.gyp:keyed_service_core',
- '<(chromium_src_dir)/components/components.gyp:pref_registry',
- '<(chromium_src_dir)/components/components.gyp:user_prefs',
- '<(chromium_src_dir)/third_party/hunspell/hunspell.gyp:hunspell',
- '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
- '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
+ '<(chromium_src_dir)/chrome/tools/convert_dict/convert_dict.gyp:convert_dict',
+ '<(chromium_src_dir)/third_party/hunspell/hunspell.gyp:hunspell',
+ '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
+ '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
],
'defines': [
'__STDC_CONSTANT_MACROS',
'__STDC_FORMAT_MACROS',
],
'conditions': [
- ['OS == "win"', {
- # crbug.com/167187 fix size_t to int truncations
- 'msvs_disabled_warnings': [4267, ],
- }],
[ 'OS != "mac"', {
'sources/': [
['exclude', '_mac\\.(cc|cpp|mm?)$'],
@@ -116,6 +132,8 @@
'sources!': [
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.cc',
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.h',
+ '<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform.h',
+ '<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc',
],
}],
],
@@ -134,7 +152,7 @@
'<(DEPTH)/chrome/browser/printing/printer_query.h',
],
'dependencies': [
- '<(chromium_src_dir)/third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
+ '<(chromium_src_dir)/mojo/mojo_public.gyp:mojo_cpp_bindings',
],
'include_dirs': [
'<(chromium_src_dir)/extensions',
diff --git a/src/core/chromium_gpu_helper.cpp b/src/core/chromium_gpu_helper.cpp
index 349506dbd..d1133f5c2 100644
--- a/src/core/chromium_gpu_helper.cpp
+++ b/src/core/chromium_gpu_helper.cpp
@@ -50,13 +50,14 @@
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "content/common/gpu/gpu_channel_manager.h"
#include "content/gpu/gpu_child_thread.h"
+#include "gpu/ipc/service/gpu_channel_manager.h"
#ifdef Q_OS_QNX
#include "content/common/gpu/stream_texture_qnx.h"
#endif
+// FIXME: Try using content::GpuChildThread::current()
base::MessageLoop *gpu_message_loop()
{
return content::GpuChildThread::instance()->message_loop();
@@ -64,13 +65,13 @@ base::MessageLoop *gpu_message_loop()
gpu::SyncPointManager *sync_point_manager()
{
- content::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
+ gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
return gpuChannelManager->sync_point_manager();
}
gpu::gles2::MailboxManager *mailbox_manager()
{
- content::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
+ gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
return gpuChannelManager->mailbox_manager();
}
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 18596c337..882f5b1dd 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -119,9 +119,9 @@ void RenderWidgetHostViewBase::GetDefaultScreenInfo(blink::WebScreenInfo* result
namespace content {
// content/common/font_list.h
-scoped_ptr<base::ListValue> GetFontList_SlowBlocking()
+std::unique_ptr<base::ListValue> GetFontList_SlowBlocking()
{
- scoped_ptr<base::ListValue> font_list(new base::ListValue);
+ std::unique_ptr<base::ListValue> font_list(new base::ListValue);
QFontDatabase database;
for (auto family : database.families()){
@@ -166,9 +166,9 @@ namespace net {
class SSLPrivateKey { };
class X509Certificate;
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
+std::unique_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
{
- return scoped_ptr<SSLPrivateKey>();
+ return std::unique_ptr<SSLPrivateKey>();
}
} // namespace net
diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h
index b8991a2b3..2c971aab2 100644
--- a/src/core/common/qt_messages.h
+++ b/src/core/common/qt_messages.h
@@ -16,6 +16,9 @@ IPC_STRUCT_TRAITS_BEGIN(UserScriptData)
IPC_STRUCT_TRAITS_MEMBER(injectForSubframes)
IPC_STRUCT_TRAITS_MEMBER(worldId)
IPC_STRUCT_TRAITS_MEMBER(scriptId)
+ IPC_STRUCT_TRAITS_MEMBER(globs)
+ IPC_STRUCT_TRAITS_MEMBER(excludeGlobs)
+ IPC_STRUCT_TRAITS_MEMBER(urlPatterns)
IPC_STRUCT_TRAITS_END()
diff --git a/src/core/common/user_script_data.h b/src/core/common/user_script_data.h
index 943d61798..8d98890e3 100644
--- a/src/core/common/user_script_data.h
+++ b/src/core/common/user_script_data.h
@@ -60,6 +60,9 @@ struct UserScriptData {
bool injectForSubframes;
uint worldId;
uint64_t scriptId;
+ std::vector<std::string> globs;
+ std::vector<std::string> excludeGlobs;
+ std::vector<std::string> urlPatterns;
};
QT_BEGIN_NAMESPACE
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index 5822bc589..7a9656fca 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -2,11 +2,16 @@
# Trigger Qt-specific build conditions.
GYP_CONFIG += use_qt=1
+# Enable printing. We enable preview because we use preview logic even if we don't support preview.
+GYP_CONFIG += enable_basic_printing=1 enable_print_preview=1
# We do not want to ship more external binary blobs, so let v8 embed its startup data.
GYP_CONFIG += v8_use_external_startup_data=0
-# Disable printing since we don't support it yet
-GYP_CONFIG += enable_basic_printing=1 enable_print_preview=0
# WebSpeech requires Google API keys and adds dependencies on speex and flac.
GYP_CONFIG += enable_web_speech=0
# We do not use or even include the extensions
GYP_CONFIG += enable_extensions=0
+
+sanitize_address: GYP_CONFIG += asan=1
+sanitize_thread: GYP_CONFIG += tsan=1
+sanitize_memory: GYP_CONFIG += msan=1
+sanitize_undefined: GYP_CONFIG += ubsan=1
diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index de0fbbc6b..e28d7eb7c 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -4,10 +4,15 @@ include(linux.pri)
GYP_CONFIG += \
desktop_linux=1 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
clang {
- GYP_CONFIG += clang=1 host_clang=1 clang_use_chrome_plugins=0 make_clang_dir=/usr
+ GYP_CONFIG += werror=
+ clang_full_path = $$which($${QMAKE_CXX})
+ # Remove the "/bin/clang++" part.
+ clang_prefix = $$section(clang_full_path, /, 0, -3)
+ GYP_CONFIG += clang=1 host_clang=1 clang_use_chrome_plugins=0 make_clang_dir=$${clang_prefix}
linux-clang-libc++: GYP_CONFIG += use_system_libcxx=1
} else {
GYP_CONFIG += clang=0 host_clang=0
diff --git a/src/core/config/embedded_linux.pri b/src/core/config/embedded_linux.pri
index 4cb7d89fb..7a909f1e2 100644
--- a/src/core/config/embedded_linux.pri
+++ b/src/core/config/embedded_linux.pri
@@ -15,9 +15,10 @@ GYP_CONFIG += \
enable_google_now=0 \
enable_language_detection=0 \
enable_managed_users=0 \
+ enable_pdf=0 \
enable_plugin_installation=0 \
enable_plugins=0 \
- enable_printing=0 \
+ enable_print_preview=0 \
enable_session_service=0 \
enable_task_manager=0 \
enable_themes=0 \
@@ -38,5 +39,6 @@ GYP_CONFIG += \
use_x11=0 \
v8_use_snapshot=false \
want_separate_host_toolset=1 \
+ angle_enable_gl=0 \
WEBENGINE_CONFIG *= reduce_binary_size
diff --git a/src/core/config/embedded_qnx.pri b/src/core/config/embedded_qnx.pri
index c05e8bb59..3effdb816 100644
--- a/src/core/config/embedded_qnx.pri
+++ b/src/core/config/embedded_qnx.pri
@@ -5,6 +5,7 @@ include(common.pri)
GYP_CONFIG += \
disable_nacl=1 \
enable_basic_printing=0 \
+ enable_pdf=0 \
enable_plugins=0 \
enable_webrtc=0 \
use_ash=0 \
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index a318e170c..83c852f86 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -1,4 +1,5 @@
include(common.pri)
+QT_FOR_CONFIG += gui-private
# linux_use_bundled_gold currently relies on a hardcoded relative path from chromium/src/out/(Release|Debug)
# Disable it along with the -Wl,--threads flag just in case gold isn't installed on the system.
@@ -22,19 +23,24 @@ GYP_CONFIG += \
use_openssl=1
use?(nss) {
- GYP_CONFIG += use_nss_certs=1 \
+ GYP_CONFIG += \
+ use_nss_certs=1 \
+ use_nss_verifier=1 \
use_openssl_certs=0
} else {
- GYP_CONFIG += use_nss_certs=0 \
+ GYP_CONFIG += \
+ use_nss_certs=0 \
+ use_nss_verifier=0 \
use_openssl_certs=1
}
gcc:!clang: greaterThan(QT_GCC_MAJOR_VERSION, 5): GYP_CONFIG += no_delete_null_pointer_checks=1
-contains(QT_CONFIG, system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
-contains(QT_CONFIG, system-png): GYP_CONFIG += use_system_libpng=1
-contains(QT_CONFIG, system-jpeg): GYP_CONFIG += use_system_libjpeg=1
-contains(QT_CONFIG, system-harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
+qtConfig(system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
+qtConfig(system-png): GYP_CONFIG += use_system_libpng=1
+qtConfig(system-jpeg): GYP_CONFIG += use_system_libjpeg=1
+qtConfig(system-harfbuzz): use?(system_harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
+!qtConfig(glib): GYP_CONFIG += use_glib=0
contains(QT_CONFIG, pulseaudio) {
GYP_CONFIG += use_pulseaudio=1
} else {
@@ -45,7 +51,6 @@ contains(QT_CONFIG, alsa) {
} else {
GYP_CONFIG += use_alsa=0
}
-!contains(QT_CONFIG, glib): GYP_CONFIG += use_glib=0
use?(system_libevent): GYP_CONFIG += use_system_libevent=1
use?(system_libwebp): GYP_CONFIG += use_system_libwebp=1
use?(system_libsrtp): GYP_CONFIG += use_system_libsrtp=1
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index c447add4a..be037cbde 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -25,11 +25,17 @@ GYP_CONFIG += \
mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \
clang_use_chrome_plugins=0 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
# Force touch API is used in 49-based Chromium, which is included starting with 10.10.3 SDK, so we
# disable the API usage if the SDK version is lower.
!isMinOSXSDKVersion(10, 10, 3): GYP_CONFIG += disable_force_touch=1
+# Pass a supported -fstack-protect flag depending on Xcode version.
+lessThan(QMAKE_XCODE_VERSION, 6.3) {
+ GYP_CONFIG += use_xcode_stack_protector_strong=0
+}
+
QMAKE_MAC_SDK_PATH = "$$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)"
exists($$QMAKE_MAC_SDK_PATH): GYP_CONFIG += mac_sdk_path=\"$${QMAKE_MAC_SDK_PATH}\"
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri
index a99bc5303..5b9551b5a 100644
--- a/src/core/config/windows.pri
+++ b/src/core/config/windows.pri
@@ -6,7 +6,8 @@ GYP_CONFIG += \
disable_nacl=1 \
remoting=0 \
use_ash=0 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
# Libvpx build needs additional search path on Windows.
GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$OUT_PWD/$$getConfigDir()/obj/$${getChromiumSrcDir()}\""
@@ -17,7 +18,7 @@ GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"
# Gyp's parallel processing is broken on Windows
GYP_ARGS += "--no-parallel"
-contains(QT_CONFIG, angle) {
+qtConfig(angle) {
CONFIG(release, debug|release) {
GYP_ARGS += "-D qt_egl_library=\"libEGL.lib\" -D qt_glesv2_library=\"libGLESv2.lib\""
} else {
@@ -56,9 +57,7 @@ msvc:contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() {
}
msvc {
- equals(MSVC_VER, 12.0) {
- MSVS_VERSION = 2013
- } else:equals(MSVC_VER, 14.0) {
+ equals(MSVC_VER, 14.0) {
MSVS_VERSION = 2015
} else {
fatal("Visual Studio compiler version \"$$MSVC_VER\" is not supported by Qt WebEngine")
@@ -66,7 +65,7 @@ msvc {
GYP_ARGS += "-G msvs_version=$$MSVS_VERSION"
- isBuildingOnWin32(): GYP_ARGS += "-D windows_sdk_path=\"C:/Program Files/Windows Kits/8.1\""
+ isBuildingOnWin32(): GYP_ARGS += "-D windows_sdk_path=\"C:/Program Files/Windows Kits/10\""
} else {
fatal("Qt WebEngine for Windows can only be built with the Microsoft Visual Studio C++ compiler")
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index fd6bd1f86..787586540 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -39,14 +39,19 @@
#include "content_browser_client_qt.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_restrictions.h"
#if defined(ENABLE_SPELLCHECK)
#include "chrome/browser/spellchecker/spellcheck_message_filter.h"
+#if defined(USE_BROWSER_SPELLCHECKER)
+#include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h"
+#endif
#endif
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/child_process_security_policy.h"
+#include "content/public/browser/geolocation_delegate.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/media_observer.h"
#include "content/public/browser/quota_permission_context.h"
@@ -59,7 +64,7 @@
#include "content/public/common/main_function_params.h"
#include "content/public/common/url_constants.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_share_group.h"
@@ -80,21 +85,29 @@
#if defined(ENABLE_BASIC_PRINTING)
#include "printing_message_filter_qt.h"
#endif // defined(ENABLE_BASIC_PRINTING)
-#include "resource_dispatcher_host_delegate_qt.h"
-#include "user_resource_controller_host.h"
+#include "qrc_protocol_handler_qt.h"
+#include "renderer_host/resource_dispatcher_host_delegate_qt.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "web_contents_delegate_qt.h"
#include "web_engine_context.h"
#include "web_engine_library_info.h"
+#if defined(Q_OS_LINUX)
+#include "global_descriptors_qt.h"
+#include "ui/base/resource/resource_bundle.h"
+#endif
+
#if defined(ENABLE_PLUGINS)
#include "content/public/browser/browser_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
-#include "renderer/pepper/pepper_host_factory_qt.h"
+#include "renderer_host/pepper/pepper_host_factory_qt.h"
#endif
#include <QGuiApplication>
#include <QLocale>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <qpa/qplatformnativeinterface.h>
QT_BEGIN_NAMESPACE
@@ -212,9 +225,9 @@ private:
base::TimeTicks m_timerScheduledTime;
};
-scoped_ptr<base::MessagePump> messagePumpFactory()
+std::unique_ptr<base::MessagePump> messagePumpFactory()
{
- return scoped_ptr<base::MessagePump>(new MessagePumpForUIQt);
+ return base::WrapUnique(new MessagePumpForUIQt);
}
} // namespace
@@ -245,8 +258,9 @@ public:
int PreCreateThreads() Q_DECL_OVERRIDE
{
base::ThreadRestrictions::SetIOAllowed(true);
- // Like ChromeBrowserMainExtraPartsAura::PreCreateThreads does.
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, new DesktopScreenQt);
+ // Like ChromeBrowserMainExtraPartsViews::PreCreateThreads does.
+ display::Screen::SetScreenInstance(new DesktopScreenQt);
+
return 0;
}
@@ -254,16 +268,16 @@ private:
DISALLOW_COPY_AND_ASSIGN(BrowserMainPartsQt);
};
-class QtShareGLContext : public gfx::GLContext {
+class QtShareGLContext : public gl::GLContext {
public:
QtShareGLContext(QOpenGLContext *qtContext)
- : gfx::GLContext(0)
+ : gl::GLContext(0)
, m_handle(0)
{
QString platform = qApp->platformName().toLower();
QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface();
if (platform == QLatin1String("xcb")) {
- if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2)
+ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2)
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
else
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext);
@@ -275,7 +289,7 @@ public:
|| platform == QLatin1String("wayland-egl"))
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
else if (platform == QLatin1String("windows")) {
- if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2)
+ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2)
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext);
else
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), qtContext);
@@ -291,12 +305,12 @@ public:
virtual bool WasAllocatedUsingRobustnessExtension() { return false; }
// We don't care about the rest, this context shouldn't be used except for its handle.
- virtual bool Initialize(gfx::GLSurface *, gfx::GpuPreference) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
- virtual bool MakeCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
- virtual void ReleaseCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
- virtual bool IsCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual bool Initialize(gl::GLSurface *, gl::GpuPreference) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual bool MakeCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual void ReleaseCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
+ virtual bool IsCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
virtual void OnSetSwapInterval(int) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
- virtual scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() Q_DECL_OVERRIDE
+ virtual scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() Q_DECL_OVERRIDE
{
return nullptr;
}
@@ -305,9 +319,9 @@ private:
void *m_handle;
};
-class ShareGroupQtQuick : public gfx::GLShareGroup {
+class ShareGroupQtQuick : public gl::GLShareGroup {
public:
- virtual gfx::GLContext* GetContext() Q_DECL_OVERRIDE { return m_shareContextQtQuick.get(); }
+ virtual gl::GLContext* GetContext() Q_DECL_OVERRIDE { return m_shareContextQtQuick.get(); }
virtual void AboutToAddFirstContext() Q_DECL_OVERRIDE;
private:
@@ -316,12 +330,14 @@ private:
void ShareGroupQtQuick::AboutToAddFirstContext()
{
+#ifndef QT_NO_OPENGL
// This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering.
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}
m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext));
+#endif
}
class QuotaPermissionContextQt : public content::QuotaPermissionContext {
@@ -353,7 +369,7 @@ ContentBrowserClientQt *ContentBrowserClientQt::Get()
content::BrowserMainParts *ContentBrowserClientQt::CreateBrowserMainParts(const content::MainFunctionParams&)
{
- m_browserMainParts = new BrowserMainPartsQt;
+ m_browserMainParts = new BrowserMainPartsQt();
return m_browserMainParts;
}
@@ -367,8 +383,12 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost*
host->AddFilter(new BrowserMessageFilterQt(id));
#endif
#if defined(ENABLE_SPELLCHECK)
+ // SpellCheckMessageFilter is required for both Hunspell and Native configurations.
host->AddFilter(new SpellCheckMessageFilter(id));
#endif
+#if defined(Q_OS_MACOS) && defined(USE_BROWSER_SPELLCHECKER)
+ host->AddFilter(new SpellCheckMessageFilterPlatform(id));
+#endif
#if defined(ENABLE_BASIC_PRINTING)
host->AddFilter(new PrintingMessageFilterQt(host->GetID()));
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -380,7 +400,7 @@ void ContentBrowserClientQt::ResourceDispatcherHostCreated()
content::ResourceDispatcherHost::Get()->SetDelegate(m_resourceDispatcherHostDelegate.get());
}
-gfx::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup()
+gl::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup()
{
if (!m_shareGroupQtQuick.get())
m_shareGroupQtQuick = new ShareGroupQtQuick;
@@ -398,14 +418,41 @@ void ContentBrowserClientQt::OverrideWebkitPrefs(content::RenderViewHost *rvh, c
static_cast<WebContentsDelegateQt*>(webContents->GetDelegate())->overrideWebPreferences(webContents, web_prefs);
}
-content::AccessTokenStore *ContentBrowserClientQt::CreateAccessTokenStore()
-{
- return new AccessTokenStoreQt;
-}
+namespace {
+
+// A provider of services needed by Geolocation.
+class GeolocationDelegateQt : public content::GeolocationDelegate {
+public:
+ GeolocationDelegateQt() {}
+ content::AccessTokenStore* CreateAccessTokenStore() final
+ {
+ return new AccessTokenStoreQt;
+ }
+
+ content::LocationProvider* OverrideSystemLocationProvider() final
+ {
+#ifdef QT_USE_POSITIONING
+ if (!m_location_provider)
+ m_location_provider = base::WrapUnique(new LocationProviderQt);
+ return m_location_provider.get();
+#else
+ return nullptr;
+#endif
+ }
+
+private:
+#ifdef QT_USE_POSITIONING
+ std::unique_ptr<LocationProviderQt> m_location_provider;
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(GeolocationDelegateQt);
+};
+
+} // anonymous namespace
-net::URLRequestContextGetter* ContentBrowserClientQt::CreateRequestContext(content::BrowserContext* browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors)
+content::GeolocationDelegate *ContentBrowserClientQt::CreateGeolocationDelegate()
{
- return static_cast<BrowserContextQt*>(browser_context)->CreateRequestContext(protocol_handlers, std::move(request_interceptors));
+ return new GeolocationDelegateQt;
}
content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionContext()
@@ -437,20 +484,11 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
void ContentBrowserClientQt::SelectClientCertificate(content::WebContents * /*webContents*/,
net::SSLCertRequestInfo * /*certRequestInfo*/,
- scoped_ptr<content::ClientCertificateDelegate> delegate)
+ std::unique_ptr<content::ClientCertificateDelegate> delegate)
{
delegate->ContinueWithCertificate(nullptr);
}
-content::LocationProvider *ContentBrowserClientQt::OverrideSystemLocationProvider()
-{
-#ifdef QT_USE_POSITIONING
- return new LocationProviderQt;
-#else
- return 0; // Leave it up to Chromium to figure something out.
-#endif
-}
-
std::string ContentBrowserClientQt::GetApplicationLocale()
{
return WebEngineLibraryInfo::getApplicationLocale();
@@ -470,11 +508,33 @@ void ContentBrowserClientQt::AppendExtraCommandLineSwitches(base::CommandLine* c
command_line->AppendSwitchASCII(switches::kLang, GetApplicationLocale());
}
+void ContentBrowserClientQt::GetAdditionalWebUISchemes(std::vector<std::string>* additional_schemes)
+{
+ additional_schemes->push_back(kQrcSchemeQt);
+}
+
+#if defined(Q_OS_LINUX)
+void ContentBrowserClientQt::GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::FileDescriptorInfo* mappings)
+{
+ const std::string &locale = GetApplicationLocale();
+ const base::FilePath &locale_file_path = ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true);
+ if (locale_file_path.empty())
+ return;
+
+ // Open pak file of the current locale in the Browser process and pass its file descriptor to the sandboxed
+ // Renderer Process. FileDescriptorInfo is responsible for closing the file descriptor.
+ int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
+ base::File locale_file = base::File(locale_file_path, flags);
+ mappings->Transfer(kWebEngineLocale, base::ScopedFD(locale_file.TakePlatformFile()));
+}
+#endif
+
#if defined(ENABLE_PLUGINS)
- void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) {
- browser_host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
- }
+void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host)
+{
+ browser_host->GetPpapiHost()->AddHostFactoryFilter(
+ base::WrapUnique(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
+}
#endif
content::DevToolsManagerDelegate* ContentBrowserClientQt::GetDevToolsManagerDelegate()
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 2b023db5f..a13d14ff2 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -41,9 +41,7 @@
#define CONTENT_BROWSER_CLIENT_QT_H
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "content/public/browser/content_browser_client.h"
-#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
@@ -68,7 +66,7 @@ class WebContents;
struct MainFunctionParams;
}
-namespace gfx {
+namespace gl {
class GLShareGroup;
}
@@ -87,9 +85,9 @@ public:
virtual content::BrowserMainParts* CreateBrowserMainParts(const content::MainFunctionParams&) Q_DECL_OVERRIDE;
virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) Q_DECL_OVERRIDE;
virtual void ResourceDispatcherHostCreated() Q_DECL_OVERRIDE;
- virtual gfx::GLShareGroup* GetInProcessGpuShareGroup() Q_DECL_OVERRIDE;
+ virtual gl::GLShareGroup* GetInProcessGpuShareGroup() Q_DECL_OVERRIDE;
virtual content::MediaObserver* GetMediaObserver() Q_DECL_OVERRIDE;
- virtual content::AccessTokenStore* CreateAccessTokenStore() Q_DECL_OVERRIDE;
+ virtual content::GeolocationDelegate* CreateGeolocationDelegate() Q_DECL_OVERRIDE;
virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost *, content::WebPreferences *) Q_DECL_OVERRIDE;
virtual void AllowCertificateError(content::WebContents* web_contents,
@@ -104,14 +102,17 @@ public:
content::CertificateRequestResultType* result) Q_DECL_OVERRIDE;
virtual void SelectClientCertificate(content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
- scoped_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE;
- content::LocationProvider* OverrideSystemLocationProvider() Q_DECL_OVERRIDE;
+ std::unique_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE;
content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *browser_context, content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptorss) Q_DECL_OVERRIDE;
virtual std::string GetApplicationLocale() Q_DECL_OVERRIDE;
std::string GetAcceptLangs(content::BrowserContext* context) Q_DECL_OVERRIDE;
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) Q_DECL_OVERRIDE;
+ virtual void GetAdditionalWebUISchemes(std::vector<std::string>* additional_schemes) Q_DECL_OVERRIDE;
+
+#if defined(Q_OS_LINUX)
+ virtual void GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::FileDescriptorInfo* mappings) Q_DECL_OVERRIDE;
+#endif
#if defined(ENABLE_PLUGINS)
virtual void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) Q_DECL_OVERRIDE;
@@ -119,7 +120,7 @@ public:
private:
BrowserMainPartsQt* m_browserMainParts;
- scoped_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
+ std::unique_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
scoped_refptr<ShareGroupQtQuick> m_shareGroupQtQuick;
};
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 2afd8c3ae..5d51f65aa 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -92,8 +92,6 @@ const char kPpapiFlashVersion[] = "ppapi-flash-version";
const char kPpapiWidevinePath[] = "ppapi-widevine-path";
}
-static const base::FilePath::CharType kWidevineCdmBaseDirectory[] = FILE_PATH_LITERAL("WidevineCDM");
-
static const char kWidevineCdmPluginExtension[] = "";
static const int32_t kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV
@@ -248,11 +246,9 @@ void AddPepperWidevine(std::vector<content::PepperPluginInfo>* plugins)
// Add the supported codecs as if they came from the component manifest.
std::vector<std::string> codecs;
- codecs.push_back(kCdmSupportedCodecVorbis);
codecs.push_back(kCdmSupportedCodecVp8);
codecs.push_back(kCdmSupportedCodecVp9);
#if defined(USE_PROPRIETARY_CODECS)
- codecs.push_back(kCdmSupportedCodecAac);
codecs.push_back(kCdmSupportedCodecAvc1);
#endif // defined(USE_PROPRIETARY_CODECS)
std::string codec_string =
@@ -297,6 +293,11 @@ base::StringPiece ContentClientQt::GetDataResource(int resource_id, ui::ScaleFac
return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(resource_id, scale_factor);
}
+base::RefCountedMemory *ContentClientQt::GetDataResourceBytes(int resource_id) const
+{
+ return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
+}
+
base::string16 ContentClientQt::GetLocalizedString(int message_id) const
{
return l10n_util::GetStringUTF16(message_id);
diff --git a/src/core/content_client_qt.h b/src/core/content_client_qt.h
index 6a5584cc7..4fd539bf3 100644
--- a/src/core/content_client_qt.h
+++ b/src/core/content_client_qt.h
@@ -56,6 +56,7 @@ public:
#endif
virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) const Q_DECL_OVERRIDE;
+ virtual base::RefCountedMemory* GetDataResourceBytes(int resource_id) const Q_DECL_OVERRIDE;
virtual std::string GetUserAgent() const Q_DECL_OVERRIDE { return getUserAgent(); }
virtual base::string16 GetLocalizedString(int message_id) const Q_DECL_OVERRIDE;
virtual std::string GetProduct() const Q_DECL_OVERRIDE;
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 8bd07ef75..095e54caa 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -59,7 +59,9 @@
#include "base/cpu.h"
#endif
-#include <QLocale>
+#if defined(OS_LINUX)
+#include "ui/base/ui_base_switches.h"
+#endif
namespace QtWebEngineCore {
@@ -110,6 +112,12 @@ void ContentMainDelegateQt::PreSandboxStartup()
logging::LoggingSettings settings;
settings.logging_dest = DetermineLogMode(*parsedCommandLine);
logging::InitLogging(settings);
+ // view the logs with process/thread IDs and timestamps
+ logging::SetLogItems(true, //enable_process_id
+ true, //enable_thread_id
+ true, //enable_timestamp
+ false //enable_tickcount
+ );
if (logging::GetMinLogLevel() >= logging::LOG_INFO) {
if (parsedCommandLine->HasSwitch(switches::kLoggingLevel)) {
@@ -129,6 +137,15 @@ content::ContentBrowserClient *ContentMainDelegateQt::CreateContentBrowserClient
content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClient()
{
+#if defined(OS_LINUX)
+ base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
+
+ if (parsedCommandLine->HasSwitch(switches::kLang)) {
+ const std::string &locale = parsedCommandLine->GetSwitchValueASCII(switches::kLang);
+ ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale);
+ }
+#endif
+
return new ContentRendererClientQt;
}
diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h
index dd7f38f69..3cb3b3bb3 100644
--- a/src/core/content_main_delegate_qt.h
+++ b/src/core/content_main_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/app/content_main_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include <QtCore/qcompilerdetection.h>
#include "content_browser_client_qt.h"
@@ -63,7 +62,7 @@ public:
bool BasicStartupComplete(int* /*exit_code*/) Q_DECL_OVERRIDE;
private:
- scoped_ptr<ContentBrowserClientQt> m_browserClient;
+ std::unique_ptr<ContentBrowserClientQt> m_browserClient;
};
} // namespace QtWebEngineCore
diff --git a/src/core/cookie_monster_delegate_qt.cpp b/src/core/cookie_monster_delegate_qt.cpp
index 5a4c8e707..4e52f562a 100644
--- a/src/core/cookie_monster_delegate_qt.cpp
+++ b/src/core/cookie_monster_delegate_qt.cpp
@@ -40,6 +40,7 @@
#include "cookie_monster_delegate_qt.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_thread.h"
#include "net/cookies/cookie_util.h"
@@ -55,11 +56,14 @@ static GURL sourceUrlForCookie(const QNetworkCookie &cookie) {
}
static void onSetCookieCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, bool success) {
- client->onSetCallbackResult(callbackId, success);
+
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onSetCallbackResult, base::Unretained(client), callbackId, success));
}
static void onDeleteCookiesCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, int numCookies) {
- client->onDeleteCallbackResult(callbackId, numCookies);
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onDeleteCallbackResult, base::Unretained(client), callbackId, numCookies));
}
static void onGetAllCookiesCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, const net::CookieList& cookies) {
@@ -67,14 +71,14 @@ static void onGetAllCookiesCallback(QWebEngineCookieStorePrivate *client, qint64
for (auto&& cookie: cookies)
rawCookies += toQt(cookie).toRawForm() % QByteArrayLiteral("\n");
- client->onGetAllCallbackResult(callbackId, rawCookies);
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onGetAllCallbackResult, base::Unretained(client), callbackId, rawCookies));
}
CookieMonsterDelegateQt::CookieMonsterDelegateQt()
: m_client(0)
- , m_cookieMonster(0)
+ , m_cookieMonster(nullptr)
{
-
}
CookieMonsterDelegateQt::~CookieMonsterDelegateQt()
@@ -84,13 +88,21 @@ CookieMonsterDelegateQt::~CookieMonsterDelegateQt()
bool CookieMonsterDelegateQt::hasCookieMonster()
{
- return m_cookieMonster.get();
+ return m_cookieMonster;
}
void CookieMonsterDelegateQt::getAllCookies(quint64 callbackId)
{
net::CookieMonster::GetCookieListCallback callback = base::Bind(&onGetAllCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->GetAllCookiesAsync(callback);
+
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::GetAllCookiesOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::GetAllCookiesOnIOThread(const net::CookieMonster::GetCookieListCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->GetAllCookiesAsync(callback);
}
void CookieMonsterDelegateQt::setCookie(quint64 callbackId, const QNetworkCookie &cookie, const QUrl &origin)
@@ -102,12 +114,22 @@ void CookieMonsterDelegateQt::setCookie(quint64 callbackId, const QNetworkCookie
if (callbackId != CallbackDirectory::NoCallbackId)
callback = base::Bind(&onSetCookieCallback, m_client->d_func(), callbackId);
+ GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
+
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::SetCookieOnIOThread, this,
+ gurl, cookie.toRawForm().toStdString(), callback));
+}
+
+void CookieMonsterDelegateQt::SetCookieOnIOThread(
+ const GURL& url, const std::string& cookie_line,
+ const net::CookieMonster::SetCookiesCallback& callback)
+{
net::CookieOptions options;
options.set_include_httponly();
- GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
-
- m_cookieMonster->SetCookieWithOptionsAsync(gurl, cookie.toRawForm().toStdString(), options, callback);
+ if (m_cookieMonster)
+ m_cookieMonster->SetCookieWithOptionsAsync(url, cookie_line, options, callback);
}
void CookieMonsterDelegateQt::deleteCookie(const QNetworkCookie &cookie, const QUrl &origin)
@@ -117,7 +139,15 @@ void CookieMonsterDelegateQt::deleteCookie(const QNetworkCookie &cookie, const Q
GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
- m_cookieMonster->DeleteCookieAsync(gurl, cookie.name().toStdString(), base::Closure());
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteCookieOnIOThread, this,
+ gurl, cookie.name().toStdString()));
+}
+
+void CookieMonsterDelegateQt::DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteCookieAsync(url, cookie_name, base::Closure());
}
void CookieMonsterDelegateQt::deleteSessionCookies(quint64 callbackId)
@@ -126,7 +156,14 @@ void CookieMonsterDelegateQt::deleteSessionCookies(quint64 callbackId)
Q_ASSERT(m_client);
net::CookieMonster::DeleteCallback callback = base::Bind(&onDeleteCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->DeleteSessionCookiesAsync(callback);
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteSessionCookiesOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::DeleteSessionCookiesOnIOThread(const net::CookieMonster::DeleteCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteSessionCookiesAsync(callback);
}
void CookieMonsterDelegateQt::deleteAllCookies(quint64 callbackId)
@@ -135,7 +172,14 @@ void CookieMonsterDelegateQt::deleteAllCookies(quint64 callbackId)
Q_ASSERT(m_client);
net::CookieMonster::DeleteCallback callback = base::Bind(&onDeleteCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->DeleteAllAsync(callback);
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteAllOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::DeleteAllOnIOThread(const net::CookieMonster::DeleteCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteAllAsync(callback);
}
void CookieMonsterDelegateQt::setCookieMonster(net::CookieMonster* monster)
diff --git a/src/core/cookie_monster_delegate_qt.h b/src/core/cookie_monster_delegate_qt.h
index 2ff5eeaa6..f47dc86df 100644
--- a/src/core/cookie_monster_delegate_qt.h
+++ b/src/core/cookie_monster_delegate_qt.h
@@ -66,7 +66,7 @@ static const char* const kCookieableSchemes[] =
class QWEBENGINE_EXPORT CookieMonsterDelegateQt: public net::CookieMonsterDelegate {
QPointer<QWebEngineCookieStore> m_client;
- scoped_refptr<net::CookieMonster> m_cookieMonster;
+ net::CookieMonster *m_cookieMonster;
public:
CookieMonsterDelegateQt();
~CookieMonsterDelegateQt();
@@ -84,6 +84,13 @@ public:
bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url);
void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, ChangeCause cause) override;
+
+private:
+ void GetAllCookiesOnIOThread(const net::CookieMonster::GetCookieListCallback& callback);
+ void SetCookieOnIOThread(const GURL& url, const std::string& cookie_line, const net::CookieMonster::SetCookiesCallback& callback);
+ void DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name);
+ void DeleteSessionCookiesOnIOThread(const net::CookieMonster::DeleteCallback& callback);
+ void DeleteAllOnIOThread(const net::CookieMonster::DeleteCallback& callback);
};
}
diff --git a/src/core/core_common.pri b/src/core/core_common.pri
index 9c29aea71..721e8c71a 100644
--- a/src/core/core_common.pri
+++ b/src/core/core_common.pri
@@ -10,3 +10,4 @@ CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
INCLUDEPATH += $$CHROMIUM_SRC_DIR
qtHaveModule(positioning):QT += positioning
+qtHaveModule(printsupport):QT += printsupport
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro
index d4e4d2388..81dea855a 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_gyp_generator.pro
@@ -10,10 +10,18 @@ TEMPLATE = lib
include(core_common.pri)
+macos {
+ # This fixes namespace builds on macOS. Specifically namespace ambiguity issues between Qt and
+ # Chromium forward declarations of NSString.
+ forward_declaration_macro = $$shell_quote(\"Q_FORWARD_DECLARE_OBJC_CLASS(name)=class name;\")
+} else {
+ forward_declaration_macro = "Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS"
+}
+
# Defining keywords such as 'signal' clashes with the chromium code base.
DEFINES += QT_NO_KEYWORDS \
QT_USE_QSTRINGBUILDER \
- Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS \
+ $$forward_declaration_macro \
QTWEBENGINECORE_VERSION_STR=\\\"$$MODULE_VERSION\\\" \
BUILDING_CHROMIUM
@@ -25,8 +33,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
# whenever we are cross compiling.
cross_compile: DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
-contains(QT_CONFIG, egl): CONFIG += egl
-else: DEFINES += QT_NO_EGL
+qtConfig(egl): CONFIG += egl
RESOURCES += devtools.qrc
@@ -75,30 +82,28 @@ SOURCES = \
render_view_observer_host_qt.cpp \
render_widget_host_view_qt.cpp \
renderer/content_renderer_client_qt.cpp \
- renderer/pepper/pepper_flash_browser_host_qt.cpp \
- renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp \
renderer/pepper/pepper_flash_renderer_host_qt.cpp \
- renderer/pepper/pepper_host_factory_qt.cpp \
- renderer/pepper/pepper_isolated_file_system_message_filter.cpp \
renderer/pepper/pepper_renderer_host_factory_qt.cpp \
renderer/render_frame_observer_qt.cpp \
renderer/render_view_observer_qt.cpp \
renderer/user_resource_controller.cpp \
renderer/web_channel_ipc_transport.cpp \
+ renderer_host/pepper/pepper_flash_browser_host_qt.cpp \
+ renderer_host/pepper/pepper_host_factory_qt.cpp \
+ renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp \
+ renderer_host/resource_dispatcher_host_delegate_qt.cpp \
+ renderer_host/user_resource_controller_host.cpp \
+ renderer_host/web_channel_ipc_transport_host.cpp \
resource_bundle_qt.cpp \
resource_context_qt.cpp \
- resource_dispatcher_host_delegate_qt.cpp \
ssl_host_state_delegate_qt.cpp \
- stream_video_node.cpp \
surface_factory_qt.cpp \
type_conversion.cpp \
url_request_context_getter_qt.cpp \
url_request_custom_job.cpp \
url_request_custom_job_delegate.cpp \
url_request_qrc_job_qt.cpp \
- user_resource_controller_host.cpp \
user_script.cpp \
- web_channel_ipc_transport_host.cpp \
web_contents_adapter.cpp \
web_contents_delegate_qt.cpp \
web_contents_view_qt.cpp \
@@ -107,8 +112,7 @@ SOURCES = \
web_engine_library_info.cpp \
web_engine_settings.cpp \
web_engine_visited_links_manager.cpp \
- web_event_factory.cpp \
- yuv_video_node.cpp
+ web_event_factory.cpp
HEADERS = \
access_token_store_qt.h \
@@ -144,6 +148,7 @@ HEADERS = \
file_picker_controller.h \
gl_context_qt.h \
gl_surface_qt.h \
+ global_descriptors_qt.h \
javascript_dialog_controller_p.h \
javascript_dialog_controller.h \
javascript_dialog_manager_qt.h \
@@ -158,29 +163,27 @@ HEADERS = \
render_widget_host_view_qt.h \
render_widget_host_view_qt_delegate.h \
renderer/content_renderer_client_qt.h \
- renderer/pepper/pepper_flash_browser_host_qt.h \
- renderer/pepper/pepper_flash_clipboard_message_filter_qt.h \
renderer/pepper/pepper_flash_renderer_host_qt.h \
- renderer/pepper/pepper_host_factory_qt.h \
- renderer/pepper/pepper_isolated_file_system_message_filter.h \
renderer/pepper/pepper_renderer_host_factory_qt.h \
renderer/render_frame_observer_qt.h \
renderer/render_view_observer_qt.h \
renderer/user_resource_controller.h \
renderer/web_channel_ipc_transport.h \
+ renderer_host/pepper/pepper_flash_browser_host_qt.h \
+ renderer_host/pepper/pepper_host_factory_qt.h \
+ renderer_host/pepper/pepper_isolated_file_system_message_filter.h \
+ renderer_host/resource_dispatcher_host_delegate_qt.h \
+ renderer_host/user_resource_controller_host.h \
+ renderer_host/web_channel_ipc_transport_host.h \
resource_context_qt.h \
- resource_dispatcher_host_delegate_qt.h \
ssl_host_state_delegate_qt.h \
- stream_video_node.h \
surface_factory_qt.h \
type_conversion.h \
url_request_context_getter_qt.h \
url_request_custom_job.h \
url_request_custom_job_delegate.h \
url_request_qrc_job_qt.h \
- user_resource_controller_host.h \
user_script.h \
- web_channel_ipc_transport_host.h \
web_contents_adapter.h \
web_contents_adapter_client.h \
web_contents_adapter_p.h \
@@ -191,11 +194,25 @@ HEADERS = \
web_engine_library_info.h \
web_engine_settings.h \
web_engine_visited_links_manager.h \
- web_event_factory.h \
- yuv_video_node.h
+ web_event_factory.h
+
+contains(QT_CONFIG, opengl) {
+ SOURCES += \
+ yuv_video_node.cpp \
+ stream_video_node.cpp
+
+ HEADERS += \
+ yuv_video_node.h \
+ stream_video_node.h
+}
qtHaveModule(positioning) {
SOURCES += location_provider_qt.cpp
HEADERS += location_provider_qt.h
DEFINES += QT_USE_POSITIONING=1
}
+
+qtHaveModule(printsupport) {
+ SOURCES += pdfium_printing_wrapper_qt.cpp
+ HEADERS += pdfium_printing_wrapper_qt.h
+}
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 3b9dab457..65e46dcec 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -40,9 +40,9 @@ win32-msvc* {
# and doesn't let Chromium get access to libc symbols through dlsym.
CONFIG -= bsymbolic_functions
-contains(QT_CONFIG, egl): CONFIG += egl
+qtConfig(egl): CONFIG += egl
-linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
+linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack
# Duplicated from resources/resources.gyp
@@ -58,7 +58,7 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak \
icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
!debug_and_release|!build_all|CONFIG(release, debug|release) {
- contains(QT_CONFIG, qt_framework) {
+ qtConfig(framework) {
locales.version = Versions
locales.path = Resources/qtwebengine_locales
resources.version = Versions
@@ -83,7 +83,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
}
}
- !contains(QT_CONFIG, qt_framework):!force_independent {
+ !qtConfig(framework):!force_independent {
#
# Copy essential files to the qtbase build directory for non-prefix builds
#
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 8d0b8166a..baf064025 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -59,7 +59,6 @@
#include "cc/output/delegated_frame_data.h"
#include "cc/quads/debug_border_draw_quad.h"
#include "cc/quads/draw_quad.h"
-#include "cc/quads/io_surface_draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/stream_video_draw_quad.h"
@@ -71,13 +70,22 @@
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_fence.h"
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QSGSimpleRectNode>
-#include <QSGSimpleTextureNode>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+# include <QOpenGLFunctions>
+# include <QSGFlatColorMaterial>
+#endif
#include <QSGTexture>
#include <private/qsgadaptationlayer_p.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QSGImageNode>
+#include <QSGRectangleNode>
+#else
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
+
#if !defined(QT_NO_EGL)
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -91,8 +99,24 @@
#define GL_TEXTURE_RECTANGLE 0x84F5
#endif
-namespace QtWebEngineCore {
+#ifndef GL_LINEAR
+#define GL_LINEAR 0x2601
+#endif
+
+#ifndef GL_RGBA
+#define GL_RGBA 0x1908
+#endif
+
+#ifndef GL_RGB
+#define GL_RGB 0x1907
+#endif
+
+#ifndef GL_LINE_LOOP
+#define GL_LINE_LOOP 0x0002
+#endif
+namespace QtWebEngineCore {
+#ifndef QT_NO_OPENGL
class MailboxTexture : public QSGTexture, protected QOpenGLFunctions {
public:
MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QSize textureSize);
@@ -122,7 +146,7 @@ private:
#endif
friend class DelegatedFrameNode;
};
-
+#endif // QT_NO_OPENGL
class ResourceHolder {
public:
ResourceHolder(const cc::TransferableResource &resource);
@@ -196,22 +220,23 @@ static QSGNode *buildLayerChain(QSGNode *chainParent, const cc::SharedQuadState
return layerChain;
}
-static void waitChromiumSync(gfx::TransferableFence *sync)
+#ifndef QT_NO_OPENGL
+static void waitChromiumSync(gl::TransferableFence *sync)
{
// Chromium uses its own GL bindings and stores in in thread local storage.
// For that reason, let chromium_gpu_helper.cpp contain the producing code that will run in the Chromium
// GPU thread, and put the sync consuming code here that will run in the QtQuick SG or GUI thread.
switch (sync->type) {
- case gfx::TransferableFence::NoSync:
+ case gl::TransferableFence::NoSync:
break;
- case gfx::TransferableFence::EglSync:
+ case gl::TransferableFence::EglSync:
#ifdef EGL_KHR_reusable_sync
{
static bool resolved = false;
static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
+ if (gl::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)context->getProcAddress("eglClientWaitSyncKHR");
}
@@ -224,7 +249,7 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
}
#endif
break;
- case gfx::TransferableFence::ArbSync:
+ case gl::TransferableFence::ArbSync:
typedef void (QOPENGLF_APIENTRYP WaitSyncPtr)(GLsync sync, GLbitfield flags, GLuint64 timeout);
static WaitSyncPtr glWaitSync_ = 0;
if (!glWaitSync_) {
@@ -237,22 +262,22 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
}
}
-static void deleteChromiumSync(gfx::TransferableFence *sync)
+static void deleteChromiumSync(gl::TransferableFence *sync)
{
// Chromium uses its own GL bindings and stores in in thread local storage.
// For that reason, let chromium_gpu_helper.cpp contain the producing code that will run in the Chromium
// GPU thread, and put the sync consuming code here that will run in the QtQuick SG or GUI thread.
switch (sync->type) {
- case gfx::TransferableFence::NoSync:
+ case gl::TransferableFence::NoSync:
break;
- case gfx::TransferableFence::EglSync:
+ case gl::TransferableFence::EglSync:
#ifdef EGL_KHR_reusable_sync
{
static bool resolved = false;
static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
+ if (gl::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)context->getProcAddress("eglDestroySyncKHR");
}
@@ -267,7 +292,7 @@ static void deleteChromiumSync(gfx::TransferableFence *sync)
}
#endif
break;
- case gfx::TransferableFence::ArbSync:
+ case gl::TransferableFence::ArbSync:
typedef void (QOPENGLF_APIENTRYP DeleteSyncPtr)(GLsync sync);
static DeleteSyncPtr glDeleteSync_ = 0;
if (!glDeleteSync_) {
@@ -355,6 +380,7 @@ void MailboxTexture::fetchTexture(gpu::gles2::MailboxManager *mailboxManager)
#endif
}
}
+#endif //QT_NO_OPENGL
ResourceHolder::ResourceHolder(const cc::TransferableResource &resource)
: m_resource(resource)
@@ -368,7 +394,7 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R
if (!texture) {
if (m_resource.is_software) {
Q_ASSERT(apiDelegate);
- scoped_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
+ std::unique_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
// QSG interprets QImage::hasAlphaChannel meaning that a node should enable blending
// to draw it but Chromium keeps this information in the quads.
// The input format is currently always Format_ARGB32_Premultiplied, so assume that all
@@ -379,8 +405,12 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R
QImage image(sharedBitmap->pixels(), m_resource.size.width(), m_resource.size.height(), format);
texture.reset(apiDelegate->createTextureFromImage(image.copy()));
} else {
+#ifndef QT_NO_OPENGL
texture.reset(new MailboxTexture(m_resource.mailbox_holder, toQt(m_resource.size)));
static_cast<MailboxTexture *>(texture.data())->setHasAlphaChannel(quadNeedsBlending);
+#else
+ Q_UNREACHABLE();
+#endif
}
m_texture = texture;
}
@@ -416,12 +446,12 @@ RectClipNode::RectClipNode(const QRectF &rect)
DelegatedFrameNode::DelegatedFrameNode()
: m_numPendingSyncPoints(0)
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(QT_NO_OPENGL)
, m_contextShared(true)
#endif
{
setFlag(UsePreprocess);
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(QT_NO_OPENGL)
QOpenGLContext *currentContext = QOpenGLContext::currentContext() ;
QOpenGLContext *sharedContext = qt_gl_global_share_context();
if (!QOpenGLContext::areSharing(currentContext, sharedContext)) {
@@ -443,6 +473,7 @@ DelegatedFrameNode::~DelegatedFrameNode()
void DelegatedFrameNode::preprocess()
{
+#ifndef QT_NO_OPENGL
// With the threaded render loop the GUI thread has been unlocked at this point.
// We can now wait for the Chromium GPU thread to produce textures that will be
// rendered on our quads and fetch the IDs from the mailboxes we were given.
@@ -465,6 +496,7 @@ void DelegatedFrameNode::preprocess()
// Proceed with the actual update.
pair.second->updateTexture();
}
+#endif
}
static YUVVideoMaterial::ColorSpace toQt(cc::YUVVideoDrawQuad::ColorSpace color_space)
@@ -576,8 +608,8 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
if (!layer)
continue;
- // Only QSGImageNode currently supports QSGLayer textures.
- QSGImageNode *imageNode = apiDelegate->createImageNode();
+ // Only QSGInternalImageNode currently supports QSGLayer textures.
+ QSGInternalImageNode *imageNode = apiDelegate->createImageNode();
imageNode->setTargetRect(toQt(quad->rect));
imageNode->setInnerTargetRect(toQt(quad->rect));
imageNode->setTexture(layer);
@@ -588,8 +620,8 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
const cc::TextureDrawQuad *tquad = cc::TextureDrawQuad::MaterialCast(quad);
ResourceHolder *resource = findAndHoldResource(tquad->resource_id(), resourceCandidates);
- QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode;
- textureNode->setTextureCoordinatesTransform(tquad->y_flipped ? QSGSimpleTextureNode::MirrorVertically : QSGSimpleTextureNode::NoTransform);
+ QSGTextureNode *textureNode = apiDelegate->createTextureNode();
+ textureNode->setTextureCoordinatesTransform(tquad->y_flipped ? QSGTextureNode::MirrorVertically : QSGTextureNode::NoTransform);
textureNode->setRect(toQt(quad->rect));
textureNode->setFiltering(resource->transferableResource().filter == GL_LINEAR ? QSGTexture::Linear : QSGTexture::Nearest);
textureNode->setTexture(initAndHoldTexture(resource, quad->ShouldDrawWithBlending(), apiDelegate));
@@ -597,7 +629,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
break;
} case cc::DrawQuad::SOLID_COLOR: {
const cc::SolidColorDrawQuad *scquad = cc::SolidColorDrawQuad::MaterialCast(quad);
- QSGSimpleRectNode *rectangleNode = new QSGSimpleRectNode;
+ QSGRectangleNode *rectangleNode = apiDelegate->createRectangleNode();
// Qt only supports MSAA and this flag shouldn't be needed.
// If we ever want to use QSGRectangleNode::setAntialiasing for this we should
@@ -608,6 +640,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
rectangleNode->setColor(toQt(scquad->color));
currentLayerChain->appendChildNode(rectangleNode);
break;
+#ifndef QT_NO_OPENGL
} case cc::DrawQuad::DEBUG_BORDER: {
const cc::DebugBorderDrawQuad *dbquad = cc::DebugBorderDrawQuad::MaterialCast(quad);
QSGGeometryNode *geometryNode = new QSGGeometryNode;
@@ -632,17 +665,19 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
geometryNode->setFlags(QSGNode::OwnsGeometry | QSGNode::OwnsMaterial);
currentLayerChain->appendChildNode(geometryNode);
break;
+#endif
} case cc::DrawQuad::TILED_CONTENT: {
const cc::TileDrawQuad *tquad = cc::TileDrawQuad::MaterialCast(quad);
ResourceHolder *resource = findAndHoldResource(tquad->resource_id(), resourceCandidates);
- QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode;
+ QSGTextureNode *textureNode = apiDelegate->createTextureNode();
textureNode->setRect(toQt(quad->rect));
textureNode->setSourceRect(toQt(tquad->tex_coord_rect));
textureNode->setFiltering(resource->transferableResource().filter == GL_LINEAR ? QSGTexture::Linear : QSGTexture::Nearest);
textureNode->setTexture(initAndHoldTexture(resource, quad->ShouldDrawWithBlending(), apiDelegate));
currentLayerChain->appendChildNode(textureNode);
break;
+#ifndef QT_NO_OPENGL
} case cc::DrawQuad::YUV_VIDEO_CONTENT: {
const cc::YUVVideoDrawQuad *vquad = cc::YUVVideoDrawQuad::MaterialCast(quad);
ResourceHolder *yResource = findAndHoldResource(vquad->y_plane_resource_id(), resourceCandidates);
@@ -658,8 +693,10 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
initAndHoldTexture(uResource, quad->ShouldDrawWithBlending()),
initAndHoldTexture(vResource, quad->ShouldDrawWithBlending()),
aResource ? initAndHoldTexture(aResource, quad->ShouldDrawWithBlending()) : 0,
- toQt(vquad->ya_tex_coord_rect), toQt(vquad->uv_tex_coord_rect),
- toQt(vquad->ya_tex_size), toQt(vquad->uv_tex_size), toQt(vquad->color_space));
+ toQt(vquad->ya_tex_coord_rect), toQt(vquad->uv_tex_coord_rect),
+ toQt(vquad->ya_tex_size), toQt(vquad->uv_tex_size),
+ toQt(vquad->color_space),
+ vquad->resource_multiplier, vquad->resource_offset);
videoNode->setRect(toQt(quad->rect));
currentLayerChain->appendChildNode(videoNode);
break;
@@ -675,23 +712,10 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
svideoNode->setTextureMatrix(toQt(squad->matrix.matrix()));
currentLayerChain->appendChildNode(svideoNode);
break;
-#endif
- }
- case cc::DrawQuad::IO_SURFACE_CONTENT: {
- const cc::IOSurfaceDrawQuad *ioquad = cc::IOSurfaceDrawQuad::MaterialCast(quad);
- ResourceHolder *resource = findAndHoldResource(ioquad->io_surface_resource_id(), resourceCandidates);
- MailboxTexture *texture = static_cast<MailboxTexture *>(initAndHoldTexture(resource, quad->ShouldDrawWithBlending()));
- texture->setTarget(GL_TEXTURE_RECTANGLE);
-
- bool flip = ioquad->orientation != cc::IOSurfaceDrawQuad::FLIPPED;
- StreamVideoNode *svideoNode = new StreamVideoNode(texture, flip, RectangleTarget);
- QMatrix4x4 matrix;
- matrix.scale(ioquad->io_surface_size.width(), ioquad->io_surface_size.height());
- svideoNode->setRect(toQt(ioquad->rect));
- svideoNode->setTextureMatrix(matrix);
- currentLayerChain->appendChildNode(svideoNode);
- break;
- }
+#endif // GL_OES_EGL_image_external
+#endif // QT_NO_OPENGL
+ } case cc::DrawQuad::SURFACE_CONTENT:
+ Q_UNREACHABLE();
default:
qWarning("Unimplemented quad material: %d", quad->material);
}
@@ -727,7 +751,8 @@ QSGTexture *DelegatedFrameNode::initAndHoldTexture(ResourceHolder *resource, boo
void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxesToFetch)
{
- QList<gfx::TransferableFence> transferredFences;
+#ifndef QT_NO_OPENGL
+ QList<gl::TransferableFence> transferredFences;
{
QMutexLocker lock(&m_mutex);
@@ -759,7 +784,7 @@ void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxe
m_textureFences.swap(transferredFences);
}
- Q_FOREACH (gfx::TransferableFence sync, transferredFences) {
+ Q_FOREACH (gl::TransferableFence sync, transferredFences) {
// We need to wait on the fences on the Qt current context, and
// can therefore not use GLFence routines that uses a different
// concept of current context.
@@ -822,25 +847,33 @@ void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxe
currentContext->makeCurrent(surface);
}
#endif
+#else
+ Q_UNUSED(mailboxesToFetch)
+#endif //QT_NO_OPENGL
}
void DelegatedFrameNode::pullTexture(DelegatedFrameNode *frameNode, MailboxTexture *texture)
{
+#ifndef QT_NO_OPENGL
gpu::gles2::MailboxManager *mailboxManager = mailbox_manager();
gpu::SyncToken &syncToken = texture->mailboxHolder().sync_token;
if (syncToken.HasData())
mailboxManager->PullTextureUpdates(syncToken);
texture->fetchTexture(mailboxManager);
- if (!!gfx::GLContext::GetCurrent() && gfx::GLFence::IsSupported()) {
+ if (!!gl::GLContext::GetCurrent() && gl::GLFence::IsSupported()) {
// Create a fence on the Chromium GPU-thread and context
- gfx::GLFence *fence = gfx::GLFence::Create();
+ gl::GLFence *fence = gl::GLFence::Create();
// But transfer it to something generic since we need to read it using Qt's OpenGL.
frameNode->m_textureFences.append(fence->Transfer());
delete fence;
}
if (--frameNode->m_numPendingSyncPoints == 0)
base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DelegatedFrameNode::fenceAndUnlockQt, frameNode));
+#else
+ Q_UNUSED(frameNode)
+ Q_UNUSED(texture)
+#endif
}
void DelegatedFrameNode::fenceAndUnlockQt(DelegatedFrameNode *frameNode)
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h
index 005f4c768..36ec20f1d 100644
--- a/src/core/delegated_frame_node.h
+++ b/src/core/delegated_frame_node.h
@@ -40,7 +40,6 @@
#ifndef DELEGATED_FRAME_NODE_H
#define DELEGATED_FRAME_NODE_H
-#include "base/memory/scoped_ptr.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/transferable_resource.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
@@ -74,7 +73,7 @@ class ChromiumCompositorData : public QSharedData {
public:
ChromiumCompositorData() : frameDevicePixelRatio(1) { }
QHash<unsigned, QSharedPointer<ResourceHolder> > resourceHolders;
- scoped_ptr<cc::DelegatedFrameData> frameData;
+ std::unique_ptr<cc::DelegatedFrameData> frameData;
qreal frameDevicePixelRatio;
};
@@ -104,8 +103,8 @@ private:
int m_numPendingSyncPoints;
QWaitCondition m_mailboxesFetchedWaitCond;
QMutex m_mutex;
- QList<gfx::TransferableFence> m_textureFences;
- scoped_ptr<gpu::SyncPointClient> m_syncPointClient;
+ QList<gl::TransferableFence> m_textureFences;
+ std::unique_ptr<gpu::SyncPointClient> m_syncPointClient;
#if defined(USE_X11)
bool m_contextShared;
QScopedPointer<QOffscreenSurface> m_offsurface;
diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp
index 0904aec59..f18a27ed7 100644
--- a/src/core/desktop_screen_qt.cpp
+++ b/src/core/desktop_screen_qt.cpp
@@ -39,6 +39,9 @@
#include "desktop_screen_qt.h"
+#include "ui/display/display.h"
+#include "ui/gfx/geometry/point.h"
+
namespace QtWebEngineCore {
gfx::Point DesktopScreenQt::GetCursorScreenPoint()
@@ -47,10 +50,10 @@ gfx::Point DesktopScreenQt::GetCursorScreenPoint()
return gfx::Point();
}
-gfx::NativeWindow DesktopScreenQt::GetWindowUnderCursor()
+bool DesktopScreenQt::IsWindowUnderCursor(gfx::NativeWindow)
{
Q_UNREACHABLE();
- return gfx::NativeWindow();
+ return false;
}
gfx::NativeWindow DesktopScreenQt::GetWindowAtScreenPoint(const gfx::Point& point)
@@ -65,42 +68,42 @@ int DesktopScreenQt::GetNumDisplays() const
return 0;
}
-std::vector<gfx::Display> DesktopScreenQt::GetAllDisplays() const
+std::vector<display::Display> DesktopScreenQt::GetAllDisplays() const
{
Q_UNREACHABLE();
- return std::vector<gfx::Display>();
+ return std::vector<display::Display>();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
+display::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
{
// RenderViewHostImpl::OnStartDragging uses this to determine
// the scale factor for the view.
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
+display::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
+display::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetPrimaryDisplay() const
+display::Display DesktopScreenQt::GetPrimaryDisplay() const
{
- return gfx::Display();
+ return display::Display();
}
-void DesktopScreenQt::AddObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::AddObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
-void DesktopScreenQt::RemoveObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::RemoveObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h
index ec7fe2e32..0e7588ae2 100644
--- a/src/core/desktop_screen_qt.h
+++ b/src/core/desktop_screen_qt.h
@@ -40,26 +40,26 @@
#ifndef DESKTOP_SCREEN_QT_H
#define DESKTOP_SCREEN_QT_H
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include <QtGlobal>
namespace QtWebEngineCore {
-class DesktopScreenQt : public gfx::Screen {
+class DesktopScreenQt : public display::Screen {
public:
// Overridden from gfx::Screen:
virtual gfx::Point GetCursorScreenPoint() Q_DECL_OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() Q_DECL_OVERRIDE;
+ virtual bool IsWindowUnderCursor(gfx::NativeWindow) Q_DECL_OVERRIDE;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) Q_DECL_OVERRIDE;
virtual int GetNumDisplays() const Q_DECL_OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual std::vector<display::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
+ virtual display::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
+ virtual void AddObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual void RemoveObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
};
} // namespace QtWebEngineCore
diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp
index f3ffcc86d..5fd35ee29 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.cpp
+++ b/src/core/dev_tools_http_handler_delegate_qt.cpp
@@ -50,6 +50,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/devtools_discovery/devtools_discovery_manager.h"
@@ -85,10 +86,10 @@ public:
: m_address(address), m_port(port), m_backlog(backlog)
{}
private:
- scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
- scoped_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
+ std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
+ std::unique_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
if (socket->ListenWithAddressAndPort(m_address, m_port, m_backlog) != net::OK)
- return scoped_ptr<net::ServerSocket>();
+ return std::unique_ptr<net::ServerSocket>();
return socket;
}
@@ -178,18 +179,18 @@ DevToolsTargetDescriptor::List DevToolsDiscoveryProviderQt::GetDescriptors()
namespace QtWebEngineCore {
-scoped_ptr<DevToolsHttpHandler> createDevToolsHttpHandler()
+std::unique_ptr<DevToolsHttpHandler> createDevToolsHttpHandler()
{
DevToolsHttpHandlerDelegateQt *delegate = new DevToolsHttpHandlerDelegateQt();
if (!delegate->isValid()) {
delete delegate;
return nullptr;
}
- scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
+ std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
// Ownership of the delegate is taken over the devtools http handler.
- scoped_ptr<DevToolsHttpHandler> handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string()));
- DevToolsDiscoveryManager::GetInstance()->AddProvider(scoped_ptr<DevToolsDiscoveryManager::Provider>(new DevToolsDiscoveryProviderQt()));
- return handler;
+ std::unique_ptr<DevToolsHttpHandler> handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string()));
+ DevToolsDiscoveryManager::GetInstance()->AddProvider(base::WrapUnique(new DevToolsDiscoveryProviderQt()));
+ return std::move(handler);
}
DevToolsHttpHandlerDelegateQt::DevToolsHttpHandlerDelegateQt()
diff --git a/src/core/dev_tools_http_handler_delegate_qt.h b/src/core/dev_tools_http_handler_delegate_qt.h
index 96a34a45a..6512146a5 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.h
+++ b/src/core/dev_tools_http_handler_delegate_qt.h
@@ -56,7 +56,7 @@ class DevToolsHttpHandler;
namespace QtWebEngineCore {
-scoped_ptr<devtools_http_handler::DevToolsHttpHandler> createDevToolsHttpHandler();
+std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> createDevToolsHttpHandler();
class DevToolsHttpHandlerDelegateQt : public devtools_http_handler::DevToolsHttpHandlerDelegate {
public:
diff --git a/src/core/doc/src/qtwebenginecore-index.qdoc b/src/core/doc/src/qtwebenginecore-index.qdoc
index 70af397ce..4d540e277 100644
--- a/src/core/doc/src/qtwebenginecore-index.qdoc
+++ b/src/core/doc/src/qtwebenginecore-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebenginecore-index.html
\title Qt WebEngine Core
- \ingroup modules
\brief Provides common API shared by Qt WebEngine and Qt WebEngine Widgets.
diff --git a/src/core/doc/src/qtwebenginecore-module.qdoc b/src/core/doc/src/qtwebenginecore-module.qdoc
index 6dc2478fc..0ac20a794 100644
--- a/src/core/doc/src/qtwebenginecore-module.qdoc
+++ b/src/core/doc/src/qtwebenginecore-module.qdoc
@@ -32,6 +32,7 @@
\brief Provides public API shared by both QtWebEngine and QtWebEngineWidgets
\since 5.6
\ingroup qtwebengine-modules
+ \ingroup modules
To include the definitions of the module's classes, use the
following directive:
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index 857af2e18..2cbfd121b 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -56,6 +56,7 @@
#include "browser_context_adapter_client.h"
#include "browser_context_qt.h"
#include "type_conversion.h"
+#include "web_contents_delegate_qt.h"
#include "qtwebenginecoreglobal.h"
namespace QtWebEngineCore {
@@ -74,6 +75,7 @@ DownloadManagerDelegateQt::DownloadManagerDelegateQt(BrowserContextAdapter *cont
: m_contextAdapter(contextAdapter)
, m_currentId(0)
, m_weakPtrFactory(this)
+ , m_downloadType(BrowserContextAdapterClient::Attachment)
{
Q_ASSERT(m_contextAdapter);
}
@@ -115,6 +117,11 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i
QString suggestedFilename = toQt(item->GetSuggestedFilename());
QString mimeTypeString = toQt(item->GetMimeType());
+ bool isAttachment = net::HttpContentDisposition(item->GetContentDisposition(), std::string()).is_attachment();
+
+ if (!isAttachment || !BrowserContextAdapterClient::UserRequested)
+ m_downloadType = BrowserContextAdapterClient::DownloadAttribute;
+
if (suggestedFilename.isEmpty())
suggestedFilename = toQt(net::HttpContentDisposition(item->GetContentDisposition(), std::string()).filename());
@@ -157,7 +164,8 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i
mimeTypeString,
suggestedFilePath,
BrowserContextAdapterClient::UnknownSavePageFormat,
- false /* accepted */
+ false /* accepted */,
+ m_downloadType
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
@@ -211,12 +219,30 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
if (clients.isEmpty())
return;
- const QString suggestedFileName
- = QFileInfo(toQt(suggested_path.AsUTF8Unsafe())).completeBaseName()
- + QStringLiteral(".mhtml");
- const QDir defaultDownloadDirectory
- = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
- const QString suggestedFilePath = defaultDownloadDirectory.absoluteFilePath(suggestedFileName);
+ WebContentsDelegateQt *contentsDelegate = static_cast<WebContentsDelegateQt *>(
+ web_contents->GetDelegate());
+ const SavePageInfo &spi = contentsDelegate->savePageInfo();
+
+ bool acceptedByDefault = false;
+ QString suggestedFilePath = spi.requestedFilePath;
+ if (suggestedFilePath.isEmpty()) {
+ suggestedFilePath = QFileInfo(toQt(suggested_path.AsUTF8Unsafe())).completeBaseName()
+ + QStringLiteral(".mhtml");
+ } else {
+ acceptedByDefault = true;
+ }
+ if (QFileInfo(suggestedFilePath).isRelative()) {
+ const QDir downloadDir(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
+ suggestedFilePath = downloadDir.absoluteFilePath(suggestedFilePath);
+ }
+
+ BrowserContextAdapterClient::SavePageFormat suggestedSaveFormat
+ = static_cast<BrowserContextAdapterClient::SavePageFormat>(spi.requestedFormat);
+ if (suggestedSaveFormat == BrowserContextAdapterClient::UnknownSavePageFormat)
+ suggestedSaveFormat = BrowserContextAdapterClient::MimeHtmlSaveFormat;
+
+ // Clear the delegate's SavePageInfo. It's only valid for the page currently being saved.
+ contentsDelegate->setSavePageInfo(SavePageInfo());
BrowserContextAdapterClient::DownloadItemInfo info = {
m_currentId + 1,
@@ -226,8 +252,9 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
0, /* receivedBytes */
QStringLiteral("application/x-mimearchive"),
suggestedFilePath,
- BrowserContextAdapterClient::MimeHtmlSaveFormat,
- false /* accepted */
+ suggestedSaveFormat,
+ acceptedByDefault,
+ BrowserContextAdapterClient::SavePage
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
@@ -263,7 +290,8 @@ void DownloadManagerDelegateQt::OnDownloadUpdated(content::DownloadItem *downloa
toQt(download->GetMimeType()),
QString(),
BrowserContextAdapterClient::UnknownSavePageFormat,
- true /* accepted */
+ true /* accepted */,
+ m_downloadType
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h
index e724b4e23..e603724e9 100644
--- a/src/core/download_manager_delegate_qt.h
+++ b/src/core/download_manager_delegate_qt.h
@@ -82,9 +82,10 @@ public:
bool can_save_as_complete,
const content::SavePackagePathPickedCallback &callback) Q_DECL_OVERRIDE;
-
void cancelDownload(quint32 downloadId);
+ void setDownloadType(int downloadType) { m_downloadType = downloadType; }
+
// Inherited from content::DownloadItem::Observer
void OnDownloadUpdated(content::DownloadItem *download) Q_DECL_OVERRIDE;
void OnDownloadDestroyed(content::DownloadItem *download) Q_DECL_OVERRIDE;
@@ -96,6 +97,7 @@ private:
uint64_t m_currentId;
base::WeakPtrFactory<DownloadManagerDelegateQt> m_weakPtrFactory;
+ int m_downloadType;
friend class DownloadManagerDelegateInstance;
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegateQt);
diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp
index 6c3889907..74b097ef6 100644
--- a/src/core/file_picker_controller.cpp
+++ b/src/core/file_picker_controller.cpp
@@ -111,20 +111,20 @@ void FilePickerController::filesSelectedInChooser(const QStringList &filesList,
if (this->m_mode == UploadFolder && !filesList.isEmpty()
&& QFileInfo(filesList.first()).isDir()) // Enumerate the directory
files = listRecursively(QDir(filesList.first()));
- rvh->FilesSelectedInChooser(toVector<content::FileChooserFileInfo>(files), static_cast<content::FileChooserParams::Mode>(this->m_mode));
+ rvh->GetMainFrame()->FilesSelectedInChooser(toVector<content::FileChooserFileInfo>(files), static_cast<content::FileChooserParams::Mode>(this->m_mode));
}
-QStringList FilePickerController::acceptedMimeTypes()
+QStringList FilePickerController::acceptedMimeTypes() const
{
return m_acceptedMimeTypes;
}
-FilePickerController::FileChooserMode FilePickerController::mode()
+FilePickerController::FileChooserMode FilePickerController::mode() const
{
return m_mode;
}
-QString FilePickerController::defaultFileName()
+QString FilePickerController::defaultFileName() const
{
return m_defaultFileName;
}
diff --git a/src/core/file_picker_controller.h b/src/core/file_picker_controller.h
index 6edee7713..14e8de42d 100644
--- a/src/core/file_picker_controller.h
+++ b/src/core/file_picker_controller.h
@@ -61,10 +61,9 @@ public:
};
FilePickerController(FileChooserMode mode, content::WebContents *contents, const QString &defaultFileName, const QStringList &acceptedMimeTypes, QObject * = 0);
- QStringList acceptedMimeTypes();
- QString defaultFileName();
- FileChooserMode mode();
- void filesSelectedInChooser(const QStringList &filesList, content::WebContents *contents);
+ QStringList acceptedMimeTypes() const;
+ QString defaultFileName() const;
+ FileChooserMode mode() const;
public Q_SLOTS:
void accepted(const QStringList &files);
@@ -72,6 +71,7 @@ public Q_SLOTS:
void rejected();
private:
+ void filesSelectedInChooser(const QStringList &filesList, content::WebContents *contents);
QString m_defaultFileName;
QStringList m_acceptedMimeTypes;
content::WebContents *m_contents;
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
index b7d82e77a..a1855b060 100644
--- a/src/core/gl_context_qt.cpp
+++ b/src/core/gl_context_qt.cpp
@@ -63,11 +63,15 @@ namespace {
inline void *resourceForContext(const QByteArray &resource)
{
+#ifndef QT_NO_OPENGL
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}
return qApp->platformNativeInterface()->nativeResourceForContext(resource, shareContext);
+#else
+ return nullptr;
+#endif
}
inline void *resourceForIntegration(const QByteArray &resource)
@@ -89,19 +93,19 @@ void GLContextHelper::destroy()
contextHelper = 0;
}
-bool GLContextHelper::initializeContextOnBrowserThread(gfx::GLContext* context, gfx::GLSurface* surface)
+bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface)
{
- return context->Initialize(surface, gfx::PreferDiscreteGpu);
+ return context->Initialize(surface, gl::PreferDiscreteGpu);
}
-bool GLContextHelper::initializeContext(gfx::GLContext* context, gfx::GLSurface* surface)
+bool GLContextHelper::initializeContext(gl::GLContext* context, gl::GLSurface* surface)
{
bool ret = false;
Qt::ConnectionType connType = (QThread::currentThread() == qApp->thread()) ? Qt::DirectConnection : Qt::BlockingQueuedConnection;
QMetaObject::invokeMethod(contextHelper, "initializeContextOnBrowserThread", connType,
Q_RETURN_ARG(bool, ret),
- Q_ARG(gfx::GLContext*, context),
- Q_ARG(gfx::GLSurface*, surface));
+ Q_ARG(gl::GLContext*, context),
+ Q_ARG(gl::GLSurface*, surface));
return ret;
}
@@ -143,9 +147,11 @@ QT_END_NAMESPACE
#if defined(USE_OZONE) || defined(OS_WIN)
-namespace gfx {
+namespace gl {
-scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference)
+namespace init {
+
+scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference)
{
#if defined(OS_WIN)
scoped_refptr<GLContext> context;
@@ -167,6 +173,8 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, G
return context;
}
-} // namespace gfx
+} // namespace init
+
+} // namespace gl
#endif // defined(USE_OZONE) || defined(OS_WIN)
diff --git a/src/core/gl_context_qt.h b/src/core/gl_context_qt.h
index 2c04641d4..47cd7dc7f 100644
--- a/src/core/gl_context_qt.h
+++ b/src/core/gl_context_qt.h
@@ -42,7 +42,7 @@
#include <QObject>
-namespace gfx {
+namespace gl {
class GLContext;
class GLSurface;
}
@@ -54,7 +54,7 @@ class GLContextHelper : public QObject {
public:
static void initialize();
static void destroy();
- static bool initializeContext(gfx::GLContext* context, gfx::GLSurface* surface);
+ static bool initializeContext(gl::GLContext* context, gl::GLSurface* surface);
static void* getEGLConfig();
static void* getXConfig();
@@ -63,7 +63,7 @@ public:
static void* getNativeDisplay();
private:
- Q_INVOKABLE bool initializeContextOnBrowserThread(gfx::GLContext* context, gfx::GLSurface* surface);
+ Q_INVOKABLE bool initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface);
static GLContextHelper* contextHelper;
};
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index a82143525..74bb32d1f 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -50,12 +50,13 @@
#include "qtwebenginecoreglobal_p.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/common/gpu/image_transport_surface.h"
+#include "gpu/ipc/service/image_transport_surface.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
+#include "ui/gl/init/gl_initializer.h"
+#include "ui/gl/init/gl_factory.h"
#if defined(USE_X11)
#include "ui/gl/gl_surface_glx.h"
@@ -68,6 +69,7 @@ extern "C" {
#if defined(OS_WIN)
#include "ui/gl/gl_surface_wgl.h"
#include "ui/gl/gl_context_wgl.h"
+#include "ui/gl/vsync_provider_win.h"
#endif
// From ANGLE's egl/eglext.h.
@@ -78,7 +80,7 @@ extern "C" {
using ui::GetLastEGLErrorString;
-namespace gfx {
+namespace gl {
namespace {
@@ -313,7 +315,7 @@ bool GLSurfaceQtWGL::Initialize()
{
m_surfaceBuffer = new PbufferGLSurfaceWGL(m_size);
- return m_surfaceBuffer->Initialize();
+ return m_surfaceBuffer->Initialize(gl::GLSurface::SURFACE_DEFAULT);
}
void GLSurfaceQtWGL::Destroy()
@@ -368,8 +370,8 @@ bool GLSurfaceQtEGL::InitializeOneOff()
g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions, "EGL_KHR_surfaceless_context");
if (g_egl_surfaceless_context_supported) {
- scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(Size(1, 1));
- scoped_refptr<GLContext> context = GLContext::CreateGLContext(
+ scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(gfx::Size(1, 1));
+ scoped_refptr<GLContext> context = init::CreateGLContext(
NULL, surface.get(), PreferIntegratedGpu);
if (!context->MakeCurrent(surface.get()))
@@ -387,31 +389,6 @@ bool GLSurfaceQtEGL::InitializeOneOff()
return true;
}
-bool GLSurface::InitializeOneOffInternal()
-{
- if (GetGLImplementation() == kGLImplementationOSMesaGL)
- return false;
-
- if (GetGLImplementation() == kGLImplementationEGLGLES2)
- return GLSurfaceQtEGL::InitializeOneOff();
-
- if (GetGLImplementation() == kGLImplementationDesktopGL) {
-#if defined(OS_WIN)
- return GLSurfaceQtWGL::InitializeOneOff();
-#elif defined(USE_X11)
- if (GLSurfaceQtGLX::InitializeOneOff())
- return true;
-#endif
- // Fallback to trying EGL with desktop GL.
- if (GLSurfaceQtEGL::InitializeOneOff()) {
- g_initializedEGL = true;
- return true;
- }
- }
-
- return false;
-}
-
EGLDisplay GLSurfaceEGL::GetHardwareDisplay()
{
return static_cast<EGLDisplay>(g_display);
@@ -584,12 +561,43 @@ void* GLSurfacelessQtEGL::GetShareHandle()
return NULL;
}
-// static
+namespace init {
+
+bool InitializeGLOneOffPlatform()
+{
+#if defined(OS_WIN)
+ VSyncProviderWin::InitializeOneOff();
+#endif
+
+ if (GetGLImplementation() == kGLImplementationOSMesaGL)
+ return false;
+
+ if (GetGLImplementation() == kGLImplementationEGLGLES2)
+ return GLSurfaceQtEGL::InitializeOneOff();
+
+ if (GetGLImplementation() == kGLImplementationDesktopGL) {
+#if defined(OS_WIN)
+ return GLSurfaceQtWGL::InitializeOneOff();
+#elif defined(USE_X11)
+ if (GLSurfaceQtGLX::InitializeOneOff())
+ return true;
+#endif
+ // Fallback to trying EGL with desktop GL.
+ if (GLSurfaceQtEGL::InitializeOneOff()) {
+ g_initializedEGL = true;
+ return true;
+ }
+ }
+
+ return false;
+}
+
scoped_refptr<GLSurface>
-GLSurface::CreateOffscreenGLSurface(const gfx::Size& size)
+CreateOffscreenGLSurface(const gfx::Size& size)
{
scoped_refptr<GLSurface> surface;
switch (GetGLImplementation()) {
+ case kGLImplementationDesktopGLCoreProfile:
case kGLImplementationDesktopGL: {
#if defined(OS_WIN)
surface = new GLSurfaceQtWGL(size);
@@ -623,14 +631,15 @@ GLSurface::CreateOffscreenGLSurface(const gfx::Size& size)
return NULL;
}
-// static
scoped_refptr<GLSurface>
-GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window)
+CreateViewGLSurface(gfx::AcceleratedWidget window)
{
QT_NOT_USED
return NULL;
}
+} // namespace init
+
std::string DriverEGL::GetPlatformExtensions()
{
EGLDisplay display = GLContextHelper::getEGLDisplay();
@@ -642,15 +651,16 @@ std::string DriverEGL::GetPlatformExtensions()
return str ? std::string(str) : "";
}
-} // namespace gfx
+} // namespace gl
-namespace content {
+namespace gpu {
class GpuCommandBufferStub;
class GpuChannelManager;
-scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*, const gfx::GLSurfaceHandle&)
+scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*,
+ SurfaceHandle, gl::GLSurface::Format)
{
QT_NOT_USED
- return scoped_refptr<gfx::GLSurface>();
+ return scoped_refptr<gl::GLSurface>();
}
}
diff --git a/src/core/gl_surface_qt.h b/src/core/gl_surface_qt.h
index 33ea2a1da..9e0692c60 100644
--- a/src/core/gl_surface_qt.h
+++ b/src/core/gl_surface_qt.h
@@ -47,7 +47,7 @@
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
-namespace gfx {
+namespace gl {
class GLSurfaceQt: public GLSurface {
public:
diff --git a/src/core/global_descriptors_qt.h b/src/core/global_descriptors_qt.h
new file mode 100644
index 000000000..e9d490a2e
--- /dev/null
+++ b/src/core/global_descriptors_qt.h
@@ -0,0 +1,10 @@
+#ifndef GLOBAL_DESCRIPTORS_QT_H
+#define GLOBAL_DESCRIPTORS_QT_H
+
+#include "content/public/common/content_descriptors.h"
+
+enum {
+ kWebEngineLocale = kContentIPCDescriptorMax + 1,
+};
+
+#endif // GLOBAL_DESCRIPTORS_QT_H
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 4fab6cb97..1850447e7 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -24,7 +24,7 @@ GYP_CONFIG += disable_glibcxx_debug=1
!webcore_debug: GYP_CONFIG += remove_webcore_debug_symbols=1
!v8base_debug: GYP_CONFIG += remove_v8base_debug_symbols=1
-linux:contains(QT_CONFIG, separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
+linux:qtConfig(separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
force_debug_info {
win32: GYP_CONFIG += win_release_extra_cflags=-Zi
@@ -36,9 +36,7 @@ force_debug_info {
# Copy this logic from qt_module.prf so that ninja can run according
# to the same rules as the final module linking in core_module.pro.
!host_build:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
- contains(QT_CONFIG, build_all):CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release build_all
}
cross_compile {
@@ -122,15 +120,21 @@ contains(WEBENGINE_CONFIG, use_appstore_compliant_code): GYP_CONFIG += appstore_
# but the latter are necessary for useful debug binaries.
contains(WEBENGINE_CONFIG, reduce_binary_size): GYP_CONFIG += release_optimize=s debug_optimize=s release_unwind_tables=0
-contains(WEBENGINE_CONFIG, no_spellcheck): {
+!contains(WEBENGINE_CONFIG, use_spellchecker): {
GYP_CONFIG += enable_spellcheck=0
- osx: GYP_CONFIG += use_browser_spellchecker=0
+ macos: GYP_CONFIG += use_browser_spellchecker=0
} else {
GYP_CONFIG += enable_spellcheck=1
- osx: GYP_CONFIG += use_browser_spellchecker=1
+ macos {
+ contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+ GYP_CONFIG += use_browser_spellchecker=1
+ } else {
+ GYP_CONFIG += use_browser_spellchecker=0
+ }
+ }
}
-!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) {
+!qtConfig(framework):qtConfig(private_tests) {
GYP_CONFIG += qt_install_data=\"$$[QT_INSTALL_DATA/get]\"
GYP_CONFIG += qt_install_translations=\"$$[QT_INSTALL_TRANSLATIONS/get]\"
}
diff --git a/src/core/javascript_dialog_manager_qt.cpp b/src/core/javascript_dialog_manager_qt.cpp
index 80a28fb56..2844dba5d 100644
--- a/src/core/javascript_dialog_manager_qt.cpp
+++ b/src/core/javascript_dialog_manager_qt.cpp
@@ -55,10 +55,8 @@ JavaScriptDialogManagerQt *JavaScriptDialogManagerQt::GetInstance()
return base::Singleton<JavaScriptDialogManagerQt>::get();
}
-void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, const std::string &acceptLang, content::JavaScriptMessageType javascriptMessageType, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage)
+void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, content::JavaScriptMessageType javascriptMessageType, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage)
{
- Q_UNUSED(acceptLang);
-
WebContentsAdapterClient *client = WebContentsViewQt::from(static_cast<content::WebContentsImpl*>(webContents)->GetView())->client();
if (!client) {
if (didSuppressMessage)
@@ -70,10 +68,10 @@ void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webCon
runDialogForContents(webContents, dialogType, toQt(messageText).toHtmlEscaped(), toQt(defaultPromptText).toHtmlEscaped(), toQt(originUrl.GetOrigin()), callback);
}
-void JavaScriptDialogManagerQt::RunBeforeUnloadDialog(content::WebContents *webContents, const base::string16 &messageText,
- bool isReload, const content::JavaScriptDialogManager::DialogClosedCallback &callback) {
+void JavaScriptDialogManagerQt::RunBeforeUnloadDialog(content::WebContents *webContents, bool isReload,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback) {
Q_UNUSED(isReload);
- runDialogForContents(webContents, WebContentsAdapterClient::UnloadDialog, toQt(messageText).toHtmlEscaped(), QString() , QUrl(), callback);
+ runDialogForContents(webContents, WebContentsAdapterClient::UnloadDialog, QString()/*toQt(messageText).toHtmlEscaped()*/, QString() , QUrl(), callback);
}
bool JavaScriptDialogManagerQt::HandleJavaScriptDialog(content::WebContents *contents, bool accept, const base::string16 *promptOverride)
diff --git a/src/core/javascript_dialog_manager_qt.h b/src/core/javascript_dialog_manager_qt.h
index aea5a5ec3..8ed86c994 100644
--- a/src/core/javascript_dialog_manager_qt.h
+++ b/src/core/javascript_dialog_manager_qt.h
@@ -61,12 +61,12 @@ public:
// For use with the Singleton helper class from chromium
static JavaScriptDialogManagerQt *GetInstance();
- virtual void RunJavaScriptDialog(content::WebContents *, const GURL &, const std::string &acceptLang, content::JavaScriptMessageType javascriptMessageType,
- const base::string16 &messageText, const base::string16 &defaultPromptText,
- const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) Q_DECL_OVERRIDE;
+ virtual void RunJavaScriptDialog(content::WebContents *, const GURL &, content::JavaScriptMessageType javascriptMessageType,
+ const base::string16 &messageText, const base::string16 &defaultPromptText,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) Q_DECL_OVERRIDE;
- virtual void RunBeforeUnloadDialog(content::WebContents *, const base::string16 &messageText, bool isReload,
- const content::JavaScriptDialogManager::DialogClosedCallback &callback) Q_DECL_OVERRIDE;
+ virtual void RunBeforeUnloadDialog(content::WebContents *, bool isReload,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback) Q_DECL_OVERRIDE;
virtual bool HandleJavaScriptDialog(content::WebContents *, bool accept, const base::string16 *promptOverride) Q_DECL_OVERRIDE;
virtual void CancelActiveAndPendingDialogs(content::WebContents *contents) Q_DECL_OVERRIDE { takeDialogForContents(contents); }
virtual void ResetDialogState(content::WebContents *contents) Q_DECL_OVERRIDE { takeDialogForContents(contents); }
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 9683245a0..f06f0150f 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -60,6 +60,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "content/public/common/media_stream_request.h"
+#include "media/audio/audio_device_description.h"
#include "media/audio/audio_manager_base.h"
#include "ui/base/l10n/l10n_util.h"
@@ -89,27 +90,34 @@ base::string16 getContentsUrl(content::WebContents *webContents)
}
// Based on chrome/browser/media/desktop_capture_access_handler.cc:
-scoped_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices &devices, content::DesktopMediaID mediaId
+std::unique_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices *devices, content::DesktopMediaID mediaId
, bool captureAudio, bool /*display_notification*/, base::string16 /*application_title*/)
{
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- scoped_ptr<content::MediaStreamUI> ui;
-
- // Add selected desktop source to the list.
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
- if (captureAudio) {
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_AUDIO_CAPTURE,
- media::AudioManagerBase::kLoopbackInputDeviceId, "System Audio"));
- }
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ std::unique_ptr<content::MediaStreamUI> ui;
+
+ // Add selected desktop source to the list.
+ devices->push_back(content::MediaStreamDevice(content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
+ if (captureAudio) {
+ if (mediaId.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) {
+ devices->push_back(
+ content::MediaStreamDevice(content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ mediaId.ToString(), "Tab audio"));
+ } else {
+ // Use the special loopback device ID for system audio capture.
+ devices->push_back(content::MediaStreamDevice(
+ content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ media::AudioDeviceDescription::kLoopbackInputDeviceId,
+ "System Audio"));
+ }
+ }
- return std::move(ui);
+ return std::move(ui);
}
WebContentsAdapterClient::MediaRequestFlags mediaRequestFlagsForRequest(const content::MediaStreamRequest &request)
{
- WebContentsAdapterClient::MediaRequestFlags requestFlags;
+ WebContentsAdapterClient::MediaRequestFlags requestFlags = WebContentsAdapterClient::MediaNone;
if (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE)
requestFlags |= WebContentsAdapterClient::MediaAudioCapture;
if (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE)
@@ -187,7 +195,7 @@ void MediaCaptureDevicesDispatcher::handleMediaAccessPermissionResponse(content:
BrowserThread::UI, FROM_HERE, base::Bind(&MediaCaptureDevicesDispatcher::ProcessQueuedAccessRequest, base::Unretained(this), webContents));
}
- callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::unique_ptr<content::MediaStreamUI>());
}
@@ -247,7 +255,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
, const content::MediaResponseCallback &callback)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
@@ -288,8 +296,8 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
request.audio_type == content::MEDIA_DESKTOP_AUDIO_CAPTURE);
ui = getDevicesForDesktopCapture(
- devices, mediaId, capture_audio, true,
- getContentsUrl(webContents));
+ &devices, mediaId, capture_audio, true,
+ getContentsUrl(webContents));
callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::move(ui));
}
@@ -316,16 +324,16 @@ void MediaCaptureDevicesDispatcher::processScreenCaptureAccessRequest(content::W
JavaScriptDialogManagerQt::GetInstance()->runDialogForContents(webContents, WebContentsAdapterClient::InternalAuthorizationDialog, message
, QString(), securityOrigin, dialogCallback, title);
} else
- callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, std::unique_ptr<content::MediaStreamUI>());
}
void MediaCaptureDevicesDispatcher::handleScreenCaptureAccessRequest(content::WebContents *webContents, bool userAccepted, const base::string16 &)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (userAccepted) {
content::DesktopMediaID screenId = content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0);
- ui = getDevicesForDesktopCapture(devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
+ ui = getDevicesForDesktopCapture(&devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
}
std::map<content::WebContents*, RequestsQueue>::iterator it =
m_pendingRequests.find(webContents);
@@ -416,13 +424,19 @@ void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(int render_proces
page_request_id, security_origin, stream_type, state));
}
-void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render_process_id, int render_frame_id, int page_request_id
- , const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state)
+void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render_process_id,
+ int render_frame_id,
+ int page_request_id,
+ const GURL& security_origin,
+ content::MediaStreamType stream_type,
+ content::MediaRequestState state)
{
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
// Track desktop capture sessions. Tracking is necessary to avoid unbalanced
// session counts since not all requests will reach MEDIA_REQUEST_STATE_DONE,
// but they will all reach MEDIA_REQUEST_STATE_CLOSING.
- if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE || stream_type == content::MEDIA_TAB_VIDEO_CAPTURE) {
if (state == content::MEDIA_REQUEST_STATE_DONE) {
DesktopCaptureSession session = { render_process_id, render_frame_id,
page_request_id };
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h
index b13a9da2c..b21d40b87 100644
--- a/src/core/media_capture_devices_dispatcher.h
+++ b/src/core/media_capture_devices_dispatcher.h
@@ -49,7 +49,6 @@
#include "web_contents_adapter_client.h"
#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "content/public/browser/media_observer.h"
@@ -83,6 +82,11 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
virtual void OnMediaRequestStateChanged(int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state) Q_DECL_OVERRIDE;
virtual void OnCreatingAudioStream(int /*render_process_id*/, int /*render_frame_id*/) Q_DECL_OVERRIDE { }
+ virtual void OnSetCapturingLinkSecured(int /*render_process_id*/,
+ int /*render_frame_id*/,
+ int /*page_request_id*/,
+ content::MediaStreamType /*stream_type*/,
+ bool /*is_secure*/) Q_DECL_OVERRIDE { }
DesktopStreamsRegistry *getDesktopStreamsRegistry();
@@ -118,7 +122,7 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
RequestsQueues m_pendingRequests;
- scoped_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
+ std::unique_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
content::NotificationRegistrar m_notificationsRegistrar;
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index ff66da3c7..9b4c415c9 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -242,24 +242,18 @@ bool NetworkDelegateQt::OnCanSetCookie(const net::URLRequest& request,
return m_requestContextGetter->m_cookieDelegate->canSetCookie(toQt(request.first_party_for_cookies()), QByteArray::fromStdString(cookie_line), toQt(request.url()));
}
-void NetworkDelegateQt::OnResolveProxy(const GURL&, int, const net::ProxyService&, net::ProxyInfo*)
-{
-}
-
-void NetworkDelegateQt::OnProxyFallback(const net::ProxyServer&, int)
-{
-}
-int NetworkDelegateQt::OnBeforeSendHeaders(net::URLRequest*, const net::CompletionCallback&, net::HttpRequestHeaders*)
+int NetworkDelegateQt::OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers)
{
return net::OK;
}
-void NetworkDelegateQt::OnBeforeSendProxyHeaders(net::URLRequest*, const net::ProxyInfo&, net::HttpRequestHeaders*)
+void NetworkDelegateQt::OnBeforeSendHeaders(net::URLRequest* request, const net::ProxyInfo& proxy_info,
+ const net::ProxyRetryInfoMap& proxy_retry_info, net::HttpRequestHeaders* headers)
{
}
-void NetworkDelegateQt::OnSendHeaders(net::URLRequest*, const net::HttpRequestHeaders&)
+void NetworkDelegateQt::OnStartTransaction(net::URLRequest *request, const net::HttpRequestHeaders &headers)
{
}
diff --git a/src/core/network_delegate_qt.h b/src/core/network_delegate_qt.h
index 1324e0da3..4ded56a9d 100644
--- a/src/core/network_delegate_qt.h
+++ b/src/core/network_delegate_qt.h
@@ -76,11 +76,10 @@ public:
virtual int OnBeforeURLRequest(net::URLRequest* request, const net::CompletionCallback& callback, GURL* newUrl) override;
virtual void OnURLRequestDestroyed(net::URLRequest* request) override;
virtual bool OnCanSetCookie(const net::URLRequest&, const std::string&, net::CookieOptions*) override;
- virtual void OnResolveProxy(const GURL&, int, const net::ProxyService&, net::ProxyInfo*) override;
- virtual void OnProxyFallback(const net::ProxyServer&, int) override;
- virtual int OnBeforeSendHeaders(net::URLRequest*, const net::CompletionCallback&, net::HttpRequestHeaders*) override;
- virtual void OnBeforeSendProxyHeaders(net::URLRequest*, const net::ProxyInfo&, net::HttpRequestHeaders*) override;
- virtual void OnSendHeaders(net::URLRequest*, const net::HttpRequestHeaders&) override;
+ virtual int OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers) override;
+ virtual void OnBeforeSendHeaders(net::URLRequest* request, const net::ProxyInfo& proxy_info,
+ const net::ProxyRetryInfoMap& proxy_retry_info, net::HttpRequestHeaders* headers) override;
+ virtual void OnStartTransaction(net::URLRequest *request, const net::HttpRequestHeaders &headers) override;
virtual int OnHeadersReceived(net::URLRequest*, const net::CompletionCallback&, const net::HttpResponseHeaders*, scoped_refptr<net::HttpResponseHeaders>*, GURL*) override;
virtual void OnBeforeRedirect(net::URLRequest*, const GURL&) override;
virtual void OnResponseStarted(net::URLRequest*) override;
diff --git a/src/core/ozone_platform_eglfs.cpp b/src/core/ozone_platform_eglfs.cpp
index 6fea4259e..0b560da6c 100644
--- a/src/core/ozone_platform_eglfs.cpp
+++ b/src/core/ozone_platform_eglfs.cpp
@@ -42,7 +42,7 @@
#if defined(USE_OZONE)
#include "base/bind.h"
-#include "media/ozone/media_ozone_platform.h"
+#include "base/memory/ptr_util.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/events_ozone.h"
@@ -57,15 +57,6 @@
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
-
-namespace media {
-
-MediaOzonePlatform* CreateMediaOzonePlatformEglfs() {
- return new MediaOzonePlatform;
-}
-
-}
-
namespace ui {
namespace {
@@ -157,11 +148,11 @@ GpuPlatformSupportHost* OzonePlatformEglfs::GetGpuPlatformSupportHost() {
return gpu_platform_support_host_.get();
}
-scoped_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
+std::unique_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds)
{
- return make_scoped_ptr<PlatformWindow>(
+ return base::WrapUnique(
new EglfsWindow(delegate,
event_factory_ozone_.get(),
bounds));
@@ -171,7 +162,7 @@ ui::InputController* OzonePlatformEglfs::GetInputController() {
return input_controller_.get();
}
-scoped_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
+std::unique_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
return nullptr; // no input injection support.
}
@@ -179,14 +170,9 @@ ui::OverlayManagerOzone* OzonePlatformEglfs::GetOverlayManager() {
return overlay_manager_.get();
}
-scoped_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
-{
- return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
-}
-
-base::ScopedFD OzonePlatformEglfs::OpenClientNativePixmapDevice() const
+std::unique_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
{
- return base::ScopedFD();
+ return base::WrapUnique(new NativeDisplayDelegateOzone());
}
OzonePlatform* CreateOzonePlatformEglfs() { return new OzonePlatformEglfs; }
diff --git a/src/core/ozone_platform_eglfs.h b/src/core/ozone_platform_eglfs.h
index 3a2dfbcf0..cdc2bd1ce 100644
--- a/src/core/ozone_platform_eglfs.h
+++ b/src/core/ozone_platform_eglfs.h
@@ -61,28 +61,27 @@ class OzonePlatformEglfs : public OzonePlatform {
virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() override;
virtual GpuPlatformSupport* GetGpuPlatformSupport() override;
virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override;
- virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
+ virtual std::unique_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds) override;
- virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
- virtual base::ScopedFD OpenClientNativePixmapDevice() const override;
+ virtual std::unique_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
virtual ui::InputController* GetInputController() override;
- virtual scoped_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
+ virtual std::unique_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
virtual ui::OverlayManagerOzone* GetOverlayManager() override;
private:
virtual void InitializeUI() override;
virtual void InitializeGPU() override;
- scoped_ptr<DeviceManager> device_manager_;
+ std::unique_ptr<DeviceManager> device_manager_;
- scoped_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
- scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
- scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
+ std::unique_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
+ std::unique_ptr<CursorFactoryOzone> cursor_factory_ozone_;
+ std::unique_ptr<EventFactoryEvdev> event_factory_ozone_;
- scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
- scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
- scoped_ptr<InputController> input_controller_;
- scoped_ptr<OverlayManagerOzone> overlay_manager_;
+ std::unique_ptr<GpuPlatformSupport> gpu_platform_support_;
+ std::unique_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
+ std::unique_ptr<InputController> input_controller_;
+ std::unique_ptr<OverlayManagerOzone> overlay_manager_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatformEglfs);
};
diff --git a/src/core/pdfium_printing_wrapper_qt.cpp b/src/core/pdfium_printing_wrapper_qt.cpp
new file mode 100644
index 000000000..fceb381af
--- /dev/null
+++ b/src/core/pdfium_printing_wrapper_qt.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pdfium_printing_wrapper_qt.h"
+
+#include <QtCore/qhash.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qpainter.h>
+#include <QtPrintSupport/qprinter.h>
+
+#include "third_party/pdfium/public/fpdf_doc.h"
+#include "third_party/pdfium/public/fpdfview.h"
+
+namespace QtWebEngineCore {
+int PdfiumPrintingWrapperQt::m_libraryUsers = 0;
+
+class PDFiumPageWrapper {
+public:
+ PDFiumPageWrapper(void *data, int pageIndex, int targetWidth, int targetHeight)
+ : m_pageData(FPDF_LoadPage(data, pageIndex))
+ , m_width(FPDF_GetPageWidth(m_pageData))
+ , m_height(FPDF_GetPageHeight(m_pageData))
+ , m_index(pageIndex)
+ , m_image(createImage(targetWidth, targetHeight))
+ {
+ }
+
+ PDFiumPageWrapper()
+ : m_pageData(nullptr)
+ , m_width(-1)
+ , m_height(-1)
+ , m_index(-1)
+ , m_image(QImage())
+ {
+ }
+
+ virtual ~PDFiumPageWrapper()
+ {
+ FPDF_ClosePage(m_pageData);
+ }
+
+ QImage image()
+ {
+ return m_image;
+ }
+
+private:
+ QImage createImage(int targetWidth, int targetHeight)
+ {
+ Q_ASSERT(m_pageData);
+ if (targetWidth <= 0)
+ targetWidth = m_width;
+
+ if (targetHeight <= 0)
+ targetHeight = m_height;
+
+ QImage image(targetWidth, targetHeight, QImage::Format_RGBA8888);
+ Q_ASSERT(!image.isNull());
+ image.fill(0xFFFFFFFF);
+
+ FPDF_BITMAP bitmap = FPDFBitmap_CreateEx(image.width(), image.height(),
+ FPDFBitmap_BGRA,
+ image.scanLine(0), image.bytesPerLine());
+ Q_ASSERT(bitmap);
+
+ FPDF_RenderPageBitmap(bitmap, m_pageData,
+ 0, 0, image.width(), image.height(),
+ 0, 0);
+ FPDFBitmap_Destroy(bitmap);
+ bitmap = nullptr;
+
+ // Map BGRA to RGBA as PDFium currently does not support RGBA bitmaps directly
+ for (int i = 0; i < image.height(); i++) {
+ uchar *pixels = image.scanLine(i);
+ for (int j = 0; j < image.width(); j++) {
+ qSwap(pixels[0], pixels[2]);
+ pixels += 4;
+ }
+ }
+ return image;
+ }
+
+private:
+ void *m_pageData;
+ int m_width;
+ int m_height;
+ int m_index;
+ QImage m_image;
+};
+
+
+PdfiumPrintingWrapperQt::PdfiumPrintingWrapperQt(const void *pdfData, size_t size, const char *password)
+{
+ Q_ASSERT(pdfData);
+ Q_ASSERT(size);
+ if (m_libraryUsers++ == 0)
+ FPDF_InitLibrary();
+
+ m_documentHandle = FPDF_LoadMemDocument(pdfData, static_cast<int>(size), password);
+ m_pageCount = FPDF_GetPageCount(m_documentHandle);
+}
+
+bool PdfiumPrintingWrapperQt::printOnPrinter(QPrinter &printer)
+{
+ if (!m_documentHandle || !m_pageCount) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
+ qWarning("Failure to print on printer %ls: invalid document.\n", qUtf16Printable(printer.printerName()));
+#endif
+ return false;
+ }
+
+ int toPage = printer.toPage();
+ int fromPage = printer.fromPage();
+ bool ascendingOrder = true;
+
+ if (fromPage == 0 && toPage == 0) {
+ fromPage = 1;
+ toPage = m_pageCount;
+ }
+ fromPage = qMax(1, fromPage);
+ toPage = qMin(m_pageCount, toPage);
+
+ if (printer.pageOrder() == QPrinter::LastPageFirst) {
+ qSwap(fromPage, toPage);
+ ascendingOrder = false;
+ }
+
+ int documentCopies = printer.copyCount();
+ int pageCopies = 1;
+ if (printer.collateCopies()) {
+ pageCopies = documentCopies;
+ documentCopies = 1;
+ }
+
+ QRect printerPageRect = printer.pageRect();
+ int doubledPrinterWidth = 2 * printerPageRect.width();
+ int doubledPrinterHeight = 2 * printerPageRect.height();
+
+ QPainter painter;
+ if (!painter.begin(&printer)) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
+ qWarning("Failure to print on printer %ls: Could not open printer for painting.\n", qUtf16Printable(printer.printerName()));
+#endif
+ return false;
+ }
+
+ QHash<int, PDFiumPageWrapper*> cachedPages;
+ for (int printedDocuments = 0; printedDocuments < documentCopies; printedDocuments++) {
+ int currentPageIndex = fromPage;
+ while (true) {
+ for (int printedPages = 0; printedPages < pageCopies; printedPages++) {
+ if (printer.printerState() == QPrinter::Aborted
+ || printer.printerState() == QPrinter::Error)
+ return false;
+
+ PDFiumPageWrapper *currentPageWrapper;
+ if (!cachedPages.contains(currentPageIndex - 1)) {
+ currentPageWrapper
+ = new PDFiumPageWrapper(m_documentHandle, currentPageIndex - 1
+ , doubledPrinterWidth, doubledPrinterHeight);
+ cachedPages.insert(currentPageIndex - 1, currentPageWrapper);
+ } else {
+ currentPageWrapper = cachedPages.value(currentPageIndex - 1);
+ }
+
+ QImage currentImage = currentPageWrapper->image();
+ painter.drawImage(printerPageRect, currentImage, currentImage.rect());
+ if (printedPages < pageCopies - 1)
+ printer.newPage();
+ }
+
+ if (currentPageIndex == toPage)
+ break;
+
+ if (ascendingOrder)
+ currentPageIndex++;
+ else
+ currentPageIndex--;
+
+ printer.newPage();
+ }
+ if (printedDocuments < documentCopies - 1)
+ printer.newPage();
+ }
+ painter.end();
+
+ qDeleteAll(cachedPages);
+
+ return true;
+}
+
+PdfiumPrintingWrapperQt::~PdfiumPrintingWrapperQt()
+{
+ FPDF_CloseDocument(m_documentHandle);
+ if (--m_libraryUsers == 0)
+ FPDF_DestroyLibrary();
+}
+
+}
diff --git a/src/core/pdfium_printing_wrapper_qt.h b/src/core/pdfium_printing_wrapper_qt.h
new file mode 100644
index 000000000..3aaf2b461
--- /dev/null
+++ b/src/core/pdfium_printing_wrapper_qt.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PDFIUM_PRINTING_WRAPPER_QT_H
+#define PDFIUM_PRINTING_WRAPPER_QT_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+class QPrinter;
+QT_END_NAMESPACE
+
+namespace QtWebEngineCore {
+
+class PdfiumPrintingWrapperQt
+{
+public:
+ PdfiumPrintingWrapperQt(const void *pdfData, size_t size, const char *password = nullptr);
+ virtual ~PdfiumPrintingWrapperQt();
+ bool printOnPrinter(QPrinter &printer);
+ int pageCount() const { return m_pageCount; }
+
+private:
+ static int m_libraryUsers;
+ void *m_documentHandle;
+ int m_pageCount;
+};
+
+} // namespace QtWebEngineCore
+#endif // PDFIUM_PRINTING_WRAPPER_QT_H
diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp
index 9603dc94c..f76f100e6 100644
--- a/src/core/permission_manager_qt.cpp
+++ b/src/core/permission_manager_qt.cpp
@@ -65,6 +65,7 @@ BrowserContextAdapter::PermissionType toQt(content::PermissionType type)
case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
case content::PermissionType::MIDI:
case content::PermissionType::DURABLE_STORAGE:
+ case content::PermissionType::BACKGROUND_SYNC:
case content::PermissionType::NUM:
break;
}
@@ -85,7 +86,7 @@ void PermissionManagerQt::permissionRequestReply(const QUrl &origin, BrowserCont
{
QPair<QUrl, BrowserContextAdapter::PermissionType> key(origin, type);
m_permissions[key] = reply;
- content::PermissionStatus status = reply ? content::PERMISSION_STATUS_GRANTED : content::PERMISSION_STATUS_DENIED;
+ blink::mojom::PermissionStatus status = reply ? blink::mojom::PermissionStatus::GRANTED : blink::mojom::PermissionStatus::DENIED;
auto it = m_requests.begin();
while (it != m_requests.end()) {
if (it->origin == origin && it->type == type) {
@@ -109,14 +110,12 @@ bool PermissionManagerQt::checkPermission(const QUrl &origin, BrowserContextAdap
int PermissionManagerQt::RequestPermission(content::PermissionType permission,
content::RenderFrameHost *frameHost,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(content::PermissionStatus)>& callback)
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
{
- Q_UNUSED(user_gesture);
int request_id = ++m_requestIdCount;
BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission) {
- callback.Run(content::PERMISSION_STATUS_DENIED);
+ callback.Run(blink::mojom::PermissionStatus::DENIED);
return kNoPendingOperation;
}
// Audio and video-capture should not come this way currently
@@ -140,25 +139,23 @@ int PermissionManagerQt::RequestPermission(content::PermissionType permission,
int PermissionManagerQt::RequestPermissions(const std::vector<content::PermissionType>& permissions,
content::RenderFrameHost* frameHost,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(const std::vector<content::PermissionStatus>&)>& callback)
+ const base::Callback<void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
{
NOTIMPLEMENTED() << "RequestPermissions has not been implemented in QtWebEngine";
- Q_UNUSED(user_gesture);
Q_UNUSED(frameHost);
- std::vector<content::PermissionStatus> result(permissions.size());
+ std::vector<blink::mojom::PermissionStatus> result(permissions.size());
for (content::PermissionType permission : permissions) {
const BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission)
- result.push_back(content::PERMISSION_STATUS_DENIED);
+ result.push_back(blink::mojom::PermissionStatus::DENIED);
else {
QPair<QUrl, BrowserContextAdapter::PermissionType> key(toQt(requesting_origin), permissionType);
// TODO: Request permission from UI
if (m_permissions.contains(key) && m_permissions[key])
- result.push_back(content::PERMISSION_STATUS_GRANTED);
+ result.push_back(blink::mojom::PermissionStatus::GRANTED);
else
- result.push_back(content::PERMISSION_STATUS_DENIED);
+ result.push_back(blink::mojom::PermissionStatus::DENIED);
}
}
@@ -172,21 +169,21 @@ void PermissionManagerQt::CancelPermissionRequest(int request_id)
m_requests.remove(request_id);
}
-content::PermissionStatus PermissionManagerQt::GetPermissionStatus(
+blink::mojom::PermissionStatus PermissionManagerQt::GetPermissionStatus(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& /*embedding_origin*/)
{
const BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission)
- return content::PERMISSION_STATUS_DENIED;
+ return blink::mojom::PermissionStatus::DENIED;
QPair<QUrl, BrowserContextAdapter::PermissionType> key(toQt(requesting_origin), permissionType);
if (!m_permissions.contains(key))
- return content::PERMISSION_STATUS_ASK;
+ return blink::mojom::PermissionStatus::ASK;
if (m_permissions[key])
- return content::PERMISSION_STATUS_GRANTED;
- return content::PERMISSION_STATUS_DENIED;
+ return blink::mojom::PermissionStatus::GRANTED;
+ return blink::mojom::PermissionStatus::DENIED;
}
void PermissionManagerQt::ResetPermission(
@@ -214,7 +211,7 @@ int PermissionManagerQt::SubscribePermissionStatusChange(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& /*embedding_origin*/,
- const base::Callback<void(content::PermissionStatus)>& callback)
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
{
int subscriber_id = ++m_subscriberIdCount;
RequestOrSubscription subscriber = {
diff --git a/src/core/permission_manager_qt.h b/src/core/permission_manager_qt.h
index ff35357d8..e4392b01c 100644
--- a/src/core/permission_manager_qt.h
+++ b/src/core/permission_manager_qt.h
@@ -64,12 +64,11 @@ public:
content::PermissionType permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(content::PermissionStatus)>& callback) override;
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
void CancelPermissionRequest(int request_id) override;
- content::PermissionStatus GetPermissionStatus(
+ blink::mojom::PermissionStatus GetPermissionStatus(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin) override;
@@ -83,9 +82,8 @@ public:
const std::vector<content::PermissionType>& permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
- bool user_gesture,
const base::Callback<void(
- const std::vector<content::PermissionStatus>&)>& callback) override;
+ const std::vector<blink::mojom::PermissionStatus>&)>& callback) override;
void RegisterPermissionUsage(
content::PermissionType permission,
@@ -96,7 +94,7 @@ public:
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin,
- const base::Callback<void(content::PermissionStatus)>& callback) override;
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
void UnsubscribePermissionStatusChange(int subscription_id) override;
@@ -105,7 +103,7 @@ private:
struct RequestOrSubscription {
PermissionType type;
QUrl origin;
- base::Callback<void(content::PermissionStatus)> callback;
+ base::Callback<void(blink::mojom::PermissionStatus)> callback;
};
QHash<int, RequestOrSubscription> m_requests;
QHash<int, RequestOrSubscription> m_subscribers;
diff --git a/src/core/print_view_manager_base_qt.cpp b/src/core/print_view_manager_base_qt.cpp
index 3e12901b9..8c52e1b18 100644
--- a/src/core/print_view_manager_base_qt.cpp
+++ b/src/core/print_view_manager_base_qt.cpp
@@ -45,7 +45,6 @@
#include "web_engine_context.h"
#include "base/single_thread_task_runner.h"
-#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -246,7 +245,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
#endif
// Only used when |metafile_must_be_valid| is true.
- scoped_ptr<base::SharedMemory> shared_buf;
+ std::unique_ptr<base::SharedMemory> shared_buf;
if (metafile_must_be_valid) {
if (!base::SharedMemory::IsHandleValid(params.metafile_data_handle)) {
NOTREACHED() << "invalid memory handle";
@@ -268,7 +267,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
}
}
- scoped_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia);
+ std::unique_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia(printing::PDF_SKIA_DOCUMENT_TYPE));
if (metafile_must_be_valid) {
if (!metafile->InitFromData(shared_buf->memory(), params.data_size)) {
NOTREACHED() << "Invalid metafile header";
diff --git a/src/core/print_view_manager_base_qt.h b/src/core/print_view_manager_base_qt.h
index f1e001eee..a8b4b5fc8 100644
--- a/src/core/print_view_manager_base_qt.h
+++ b/src/core/print_view_manager_base_qt.h
@@ -42,8 +42,8 @@
#define PRINT_VIEW_MANAGER_BASE_QT_H
#include "base/memory/ref_counted.h"
-#include "base/prefs/pref_member.h"
#include "base/strings/string16.h"
+#include "components/prefs/pref_member.h"
#include "components/printing/browser/print_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -97,7 +97,7 @@ protected:
int number_pages_; // Number of pages to print in the print job.
int cookie_;
- scoped_ptr<base::DictionaryValue> m_printSettings;
+ std::unique_ptr<base::DictionaryValue> m_printSettings;
// content::NotificationObserver implementation.
void Observe(int,
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp
index f657b8289..0231df8bd 100644
--- a/src/core/print_view_manager_qt.cpp
+++ b/src/core/print_view_manager_qt.cpp
@@ -43,14 +43,17 @@
#include "type_conversion.h"
#include "web_engine_context.h"
-#include <QtGui/QPageLayout>
-#include <QtGui/QPageSize>
+#include <QtGui/qpagelayout.h>
+#include <QtGui/qpagesize.h>
#include "base/values.h"
+#include "base/memory/ref_counted_memory.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/printer_query.h"
#include "components/printing/common/print_messages.h"
+#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/web_preferences.h"
#include "printing/pdf_metafile_skia.h"
#include "printing/print_job_constants.h"
@@ -61,7 +64,7 @@ static const qreal kMicronsToMillimeter = 1000.0f;
static std::vector<char>
GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -74,7 +77,7 @@ GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
static scoped_refptr<base::RefCountedBytes>
GetBytesFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -92,7 +95,7 @@ static void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
DCHECK_GT(data->size(), 0U);
- printing::PdfMetafileSkia metafile;
+ printing::PdfMetafileSkia metafile(printing::PDF_SKIA_DOCUMENT_TYPE);
metafile.InitFromData(static_cast<const void*>(data->front()), data->size());
base::File file(path,
@@ -139,18 +142,19 @@ static base::DictionaryValue *createPrintSettingsFromQPageLayout(const QPageLayo
//Set page size attributes, chromium expects these in micrometers
QSizeF pageSizeInMilimeter = pageLayout.pageSize().size(QPageSize::Millimeter);
- scoped_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
sizeDict->SetInteger(printing::kSettingMediaSizeWidthMicrons, pageSizeInMilimeter.width() * kMicronsToMillimeter);
sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter);
printSettings->Set(printing::kSettingMediaSize, std::move(sizeDict));
// Apply page margins
QMargins pageMarginsInPoints = pageLayout.marginsPoints();
- scoped_ptr<base::DictionaryValue> marginsDict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> marginsDict(new base::DictionaryValue);
marginsDict->SetInteger(printing::kSettingMarginTop, pageMarginsInPoints.top());
marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom());
marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left());
marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right());
+
printSettings->Set(printing::kSettingMarginsCustom, std::move(marginsDict));
printSettings->SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS);
@@ -168,20 +172,20 @@ PrintViewManagerQt::~PrintViewManagerQt()
}
#if defined(ENABLE_BASIC_PRINTING)
-bool PrintViewManagerQt::PrintToPDF(const QPageLayout &pageLayout, const QString &filePath)
+bool PrintViewManagerQt::PrintToPDF(const QPageLayout &pageLayout, bool printInColor, const QString &filePath)
{
if (m_printSettings || !filePath.length())
return false;
m_pdfOutputPath = toFilePath(filePath);
- if (!PrintToPDFInternal(pageLayout)) {
+ if (!PrintToPDFInternal(pageLayout, printInColor)) {
resetPdfState();
return false;
}
return true;
}
-bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, const PrintToPDFCallback& callback)
+bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, bool printInColor, const PrintToPDFCallback& callback)
{
if (callback.is_null())
return false;
@@ -195,7 +199,7 @@ bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, c
}
m_pdfPrintCallback = callback;
- if (!PrintToPDFInternal(pageLayout)) {
+ if (!PrintToPDFInternal(pageLayout, printInColor)) {
content::BrowserThread::PostTask(content::BrowserThread::UI,
FROM_HERE,
base::Bind(callback, std::vector<char>()));
@@ -206,13 +210,15 @@ bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, c
return true;
}
-bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout)
+bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout, bool printInColor)
{
if (!pageLayout.isValid())
return false;
- m_printSettings.reset(createPrintSettingsFromQPageLayout(pageLayout));
- m_printSettings->SetInteger(printing::kSettingColor, printing::COLOR);
+ m_printSettings.reset(createPrintSettingsFromQPageLayout(pageLayout));
+ m_printSettings->SetBoolean(printing::kSettingShouldPrintBackgrounds
+ , web_contents()->GetRenderViewHost()->GetWebkitPreferences().should_print_backgrounds);
+ m_printSettings->SetInteger(printing::kSettingColor, printInColor ? printing::COLOR : printing::GRAYSCALE);
return Send(new PrintMsg_InitiatePrintPreview(routing_id(), false));
}
diff --git a/src/core/print_view_manager_qt.h b/src/core/print_view_manager_qt.h
index 88a499f1b..668516096 100644
--- a/src/core/print_view_manager_qt.h
+++ b/src/core/print_view_manager_qt.h
@@ -45,8 +45,8 @@
#include <QtWebEngineCore/qtwebenginecoreglobal.h>
#include "base/memory/ref_counted.h"
-#include "base/prefs/pref_member.h"
#include "base/strings/string16.h"
+#include "components/prefs/pref_member.h"
#include "components/printing/browser/print_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -83,8 +83,8 @@ public:
typedef base::Callback<void(const std::vector<char> &result)> PrintToPDFCallback;
#if defined(ENABLE_BASIC_PRINTING)
// Method to print a page to a Pdf document with page size \a pageSize in location \a filePath.
- bool PrintToPDF(const QPageLayout& pageLayout, const QString& filePath);
- bool PrintToPDFWithCallback(const QPageLayout& pageLayout, const PrintToPDFCallback& callback);
+ bool PrintToPDF(const QPageLayout &pageLayout, bool printInColor, const QString &filePath);
+ bool PrintToPDFWithCallback(const QPageLayout &pageLayout, bool printInColor, const PrintToPDFCallback &callback);
#endif // ENABLE_BASIC_PRINTING
// PrintedPagesSource implementation.
@@ -109,7 +109,7 @@ protected:
void OnMetafileReadyForPrinting(const PrintHostMsg_DidPreviewDocument_Params& params);
#if defined(ENABLE_BASIC_PRINTING)
- bool PrintToPDFInternal(const QPageLayout &);
+ bool PrintToPDFInternal(const QPageLayout &, bool printInColor);
#endif //
base::FilePath m_pdfOutputPath;
diff --git a/src/core/printing_message_filter_qt.cpp b/src/core/printing_message_filter_qt.cpp
index ba4d5c6e6..a84ec491f 100644
--- a/src/core/printing_message_filter_qt.cpp
+++ b/src/core/printing_message_filter_qt.cpp
@@ -76,9 +76,6 @@ void PrintingMessageFilterQt::OverrideThreadForMessage(
bool PrintingMessageFilterQt::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilterQt, message)
-#if defined(OS_WIN)
- IPC_MESSAGE_HANDLER(PrintHostMsg_DuplicateSection, OnDuplicateSection)
-#endif
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
OnGetDefaultPrintSettings)
@@ -91,17 +88,6 @@ bool PrintingMessageFilterQt::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-#if defined(OS_WIN)
-void PrintingMessageFilterQt::OnDuplicateSection(
- base::SharedMemoryHandle renderer_handle,
- base::SharedMemoryHandle* browser_handle) {
- // Duplicate the handle in this process right now so the memory is kept alive
- // (even if it is not mapped)
- base::SharedMemory shared_buf(renderer_handle, true, PeerHandle());
- shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), browser_handle);
-}
-#endif
-
void PrintingMessageFilterQt::OnIsPrintingEnabled(bool* is_enabled) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
*is_enabled = true;
@@ -201,7 +187,7 @@ void PrintingMessageFilterQt::OnScriptedPrintReply(
void PrintingMessageFilterQt::OnUpdatePrintSettings(
int document_cookie, const base::DictionaryValue& job_settings,
IPC::Message* reply_msg) {
- scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
scoped_refptr<printing::PrinterQuery> printer_query;
printer_query = queue_->PopPrinterQuery(document_cookie);
diff --git a/src/core/printing_message_filter_qt.h b/src/core/printing_message_filter_qt.h
index 95d63f570..156a31250 100644
--- a/src/core/printing_message_filter_qt.h
+++ b/src/core/printing_message_filter_qt.h
@@ -44,7 +44,7 @@
#include <string>
#include "base/compiler_specific.h"
-#include "base/prefs/pref_member.h"
+#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
#if defined(OS_WIN)
@@ -84,12 +84,6 @@ class PrintingMessageFilterQt : public content::BrowserMessageFilter {
private:
~PrintingMessageFilterQt() override;
-#if defined(OS_WIN)
- // Used to pass resulting EMF from renderer to browser in printing.
- void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
- base::SharedMemoryHandle* browser_handle);
-#endif
-
// GetPrintSettingsForRenderView must be called via PostTask and
// base::Bind. Collapse the settings-specific params into a
// struct to avoid running into issues with too many params
diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp
index bd5d0375d..a6ffb39ab 100644
--- a/src/core/proxy_config_service_qt.cpp
+++ b/src/core/proxy_config_service_qt.cpp
@@ -69,7 +69,7 @@ net::ProxyServer ProxyConfigServiceQt::fromQNetworkProxy(const QNetworkProxy &qt
//================ Based on ChromeProxyConfigService =======================
-ProxyConfigServiceQt::ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService)
+ProxyConfigServiceQt::ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService)
: m_baseService(baseService.release()),
m_registeredObserver(false)
{
@@ -109,10 +109,13 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy
}
m_qtApplicationProxy = qtProxy;
m_qtProxyConfig = net::ProxyConfig();
- if (qtProxy.type() == QNetworkProxy::NoProxy) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
+ if (qtProxy.type() == QNetworkProxy::NoProxy
+ && QNetworkProxyFactory::usesSystemConfiguration()) {
*config = systemConfig;
return systemAvailability;
}
+#endif
net::ProxyConfig::ProxyRules qtRules;
net::ProxyServer server = fromQNetworkProxy(qtProxy);
diff --git a/src/core/proxy_config_service_qt.h b/src/core/proxy_config_service_qt.h
index da24e3337..f2f9a2210 100644
--- a/src/core/proxy_config_service_qt.h
+++ b/src/core/proxy_config_service_qt.h
@@ -41,7 +41,6 @@
#define PROXY_CONFIG_SERVICE_QT_H
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "net/proxy/proxy_config.h"
@@ -56,7 +55,7 @@ public:
static net::ProxyServer fromQNetworkProxy(const QNetworkProxy &);
- explicit ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService);
+ explicit ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService);
~ProxyConfigServiceQt() override;
// ProxyConfigService implementation:
@@ -73,7 +72,7 @@ private:
// Makes sure that the observer registration with the base service is set up.
void RegisterObserver();
- scoped_ptr<net::ProxyConfigService> m_baseService;
+ std::unique_ptr<net::ProxyConfigService> m_baseService;
base::ObserverList<net::ProxyConfigService::Observer, true> m_observers;
// Keep the last QNetworkProxy::applicationProxy state around.
diff --git a/src/core/qrc_protocol_handler_qt.cpp b/src/core/qrc_protocol_handler_qt.cpp
index 222961762..eb716f182 100644
--- a/src/core/qrc_protocol_handler_qt.cpp
+++ b/src/core/qrc_protocol_handler_qt.cpp
@@ -46,6 +46,8 @@
namespace QtWebEngineCore {
+const char kQrcSchemeQt[] = "qrc";
+
QrcProtocolHandlerQt::QrcProtocolHandlerQt()
{
}
diff --git a/src/core/qrc_protocol_handler_qt.h b/src/core/qrc_protocol_handler_qt.h
index 53d063810..a2e0cc00b 100644
--- a/src/core/qrc_protocol_handler_qt.h
+++ b/src/core/qrc_protocol_handler_qt.h
@@ -53,6 +53,8 @@ class URLRequestJob;
namespace QtWebEngineCore {
+extern const char kQrcSchemeQt[];
+
// Implements a ProtocolHandler for qrc file jobs. If |network_delegate_| is NULL,
// then all file requests will fail with ERR_ACCESS_DENIED.
class QrcProtocolHandlerQt : public net::URLRequestJobFactory::ProtocolHandler {
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 816962d3d..d0ab01534 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -8,15 +8,18 @@
'dependencies': [
'<(chromium_src_dir)/base/base.gyp:base',
'<(chromium_src_dir)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '<(chromium_src_dir)/chrome/tools/convert_dict/convert_dict.gyp:convert_dict_lib',
+ '<(chromium_src_dir)/components/components.gyp:cdm_renderer',
'<(chromium_src_dir)/components/components.gyp:devtools_discovery',
'<(chromium_src_dir)/components/components.gyp:devtools_http_handler',
'<(chromium_src_dir)/components/components.gyp:error_page_renderer',
+ '<(chromium_src_dir)/components/components.gyp:keyed_service_content',
+ '<(chromium_src_dir)/components/components.gyp:keyed_service_core',
+ '<(chromium_src_dir)/components/components.gyp:pref_registry',
+ '<(chromium_src_dir)/components/components.gyp:user_prefs',
'<(chromium_src_dir)/components/components.gyp:visitedlink_browser',
'<(chromium_src_dir)/components/components.gyp:visitedlink_renderer',
'<(chromium_src_dir)/components/components.gyp:web_cache_browser',
'<(chromium_src_dir)/components/components.gyp:web_cache_renderer',
- '<(chromium_src_dir)/components/components.gyp:cdm_renderer',
'<(chromium_src_dir)/content/content.gyp:content',
'<(chromium_src_dir)/content/content.gyp:content_app_browser',
'<(chromium_src_dir)/content/content.gyp:content_browser',
@@ -36,7 +39,7 @@
'<(chromium_src_dir)/ui/base/ui_base.gyp:ui_base',
'<(chromium_src_dir)/ui/gl/gl.gyp:gl',
'<(chromium_src_dir)/url/url.gyp:url_lib',
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ '<(chromium_src_dir)/v8/src/v8.gyp:v8',
'<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_qt',
],
@@ -85,7 +88,8 @@
},
},
'dependencies': [
- '<(chromium_src_dir)/ui/events/ozone/events_ozone.gyp:events_ozone_evdev'
+ '<(chromium_src_dir)/ui/events/ozone/events_ozone.gyp:events_ozone_evdev',
+ '<(chromium_src_dir)/ui/ozone/ozone.gyp:ozone_common',
]
}],
['qt_os=="win32" and qt_gl=="opengl"', {
diff --git a/src/core/qtwebengine_extras.gypi b/src/core/qtwebengine_extras.gypi
index 229421efa..8e4c655a9 100644
--- a/src/core/qtwebengine_extras.gypi
+++ b/src/core/qtwebengine_extras.gypi
@@ -32,21 +32,28 @@
['exclude', 'browser/renderer_host/render_widget_host_view_mac\\.(mm|h)$'],
['exclude', 'browser/renderer_host/render_widget_host_view_win\\.(cc|h)$'],
['exclude', 'common/font_list_pango\\.cc$'],
- ['exclude', 'browser/accessibility/browser_accessibility_cocoa\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_cocoa\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_gtk\\.(cc|h)$'],
- ['exclude', 'browser/accessibility/browser_accessibility_mac\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_mac\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_win\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_event_win\\.(cc|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_manager_gtk\\.(cc|h)$'],
- ['exclude', 'browser/accessibility/browser_accessibility_manager_mac\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_manager_mac\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_manager_win\\.(cc|h)$'],
['exclude', 'command_buffer/service/async_pixel_transfer_manager_egl\\.(cc|h)$'],
['exclude', 'common/gpu/image_transport_surface_linux\\.cc$'],
['exclude', 'common/gpu/image_transport_surface_win\\.cc$'],
['exclude', 'gl_surface_egl\\.cc$'],
+ ['exclude', 'gl_surface_egl_ozone\\.cc$'],
+ ['exclude', 'gl_surface_egl_win\\.cc$'],
+ ['exclude', 'gl_surface_egl_x11\\.cc$'],
['exclude', 'gl_surface_glx\\.cc$'],
- ['exclude', 'gl_surface_x11\\.cc$'],
- ['exclude', 'gl_surface_win\\.cc$'],
['exclude', 'gl_surface_ozone\\.cc$'],
+ ['exclude', 'gl_factory_ozone\\.cc$'],
+ ['exclude', 'gl_factory_win\\.cc$'],
+ ['exclude', 'gl_initializer_ozone\\.cc$'],
+ ['exclude', 'gl_initializer_win\\.cc$'],
+ ['exclude', 'gl_initializer_x11\\.cc$'],
# Avoid the ATL dependency to allow building with VS Express
['exclude', 'browser/accessibility/accessibility_tree_formatter\\.(cc|h)$',],
['exclude', 'browser/accessibility/accessibility_tree_formatter_mac\\.(mm|h)$',],
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index f45db6bf4..097dda1cd 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -343,18 +343,14 @@ gfx::NativeView RenderWidgetHostViewQt::GetNativeView() const
return gfx::NativeView();
}
-gfx::NativeViewId RenderWidgetHostViewQt::GetNativeViewId() const
-{
- return 0;
-}
-
gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
{
return 0;
}
-content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate)
+content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate, bool for_root_frame)
{
+ Q_UNUSED(for_root_frame); // FIXME
#ifndef QT_NO_ACCESSIBILITY
return new content::BrowserAccessibilityManagerQt(
m_adapterClient->accessibilityParentObject(),
@@ -435,11 +431,6 @@ void RenderWidgetHostViewQt::UnlockMouse()
m_host->LostMouseLock();
}
-void RenderWidgetHostViewQt::MovePluginWindows(const std::vector<content::WebPluginGeometry>&)
-{
- // QT_NOT_YET_IMPLEMENTED
-}
-
void RenderWidgetHostViewQt::UpdateCursor(const content::WebCursor &webCursor)
{
content::WebCursor::CursorInfo cursorInfo;
@@ -580,7 +571,7 @@ void RenderWidgetHostViewQt::SetIsLoading(bool)
// We use WebContentsDelegateQt::LoadingStateChanged to notify about loading state.
}
-void RenderWidgetHostViewQt::TextInputStateChanged(const ViewHostMsg_TextInputState_Params &params)
+void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState &params)
{
m_currentInputType = params.type;
m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE);
@@ -612,7 +603,7 @@ void RenderWidgetHostViewQt::Destroy()
void RenderWidgetHostViewQt::SetTooltipText(const base::string16 &tooltip_text)
{
- m_delegate->setTooltip(toQt(tooltip_text));
+ m_adapterClient->setToolTip(toQt(tooltip_text));
}
void RenderWidgetHostViewQt::SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &params)
@@ -664,19 +655,19 @@ void RenderWidgetHostViewQt::UnlockCompositingSurface()
{
}
-void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame)
+void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame)
{
- bool scrollOffsetChanged = (m_lastScrollOffset != frame->metadata.root_scroll_offset);
- bool contentsSizeChanged = (m_lastContentsSize != frame->metadata.root_layer_size);
- m_lastScrollOffset = frame->metadata.root_scroll_offset;
- m_lastContentsSize = frame->metadata.root_layer_size;
+ bool scrollOffsetChanged = (m_lastScrollOffset != frame.metadata.root_scroll_offset);
+ bool contentsSizeChanged = (m_lastContentsSize != frame.metadata.root_layer_size);
+ m_lastScrollOffset = frame.metadata.root_scroll_offset;
+ m_lastContentsSize = frame.metadata.root_layer_size;
Q_ASSERT(!m_needsDelegatedFrameAck);
m_needsDelegatedFrameAck = true;
m_pendingOutputSurfaceId = output_surface_id;
- Q_ASSERT(frame->delegated_frame_data);
+ Q_ASSERT(frame.delegated_frame_data);
Q_ASSERT(!m_chromiumCompositorData->frameData || m_chromiumCompositorData->frameData->resource_list.empty());
- m_chromiumCompositorData->frameData = std::move(frame->delegated_frame_data);
- m_chromiumCompositorData->frameDevicePixelRatio = frame->metadata.device_scale_factor;
+ m_chromiumCompositorData->frameData = std::move(frame.delegated_frame_data);
+ m_chromiumCompositorData->frameDevicePixelRatio = frame.metadata.device_scale_factor;
// Support experimental.viewport.devicePixelRatio, see GetScreenInfo implementation below.
float dpiScale = this->dpiScale();
@@ -720,11 +711,6 @@ void RenderWidgetHostViewQt::ClearCompositorFrame()
{
}
-bool RenderWidgetHostViewQt::GetScreenColorProfile(std::vector<char>*)
-{
- return false;
-}
-
void RenderWidgetHostViewQt::SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range)
{
content::RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
@@ -882,7 +868,7 @@ void RenderWidgetHostViewQt::processMotionEvent(const ui::MotionEvent &motionEve
return;
blink::WebTouchEvent touchEvent = ui::CreateWebTouchEventFromMotionEvent(motionEvent,
- result.did_generate_scroll);
+ result.moved_beyond_slop_region);
m_host->ForwardTouchEventWithLatencyInfo(touchEvent, CreateLatencyInfo(touchEvent));
}
@@ -1032,14 +1018,6 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
};
- auto setCompositionForPreEditString = [&](){
- ensureValidSelectionRange();
- m_host->ImeSetComposition(toString16(preeditString),
- underlines,
- selectionRange.start(),
- selectionRange.end());
- };
-
Q_FOREACH (const QInputMethodEvent::Attribute &attribute, attributes) {
switch (attribute.type) {
case QInputMethodEvent::TextFormat: {
@@ -1048,7 +1026,25 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
int start = qMin(attribute.start, (attribute.start + attribute.length));
int end = qMax(attribute.start, (attribute.start + attribute.length));
- underlines.push_back(blink::WebCompositionUnderline(start, end, /*color*/ SK_ColorBLACK, /*thick*/ false, /*backgroundColor*/ SK_ColorTRANSPARENT));
+
+ // Blink does not support negative position values. Adjust start and end positions
+ // to non-negative values.
+ if (start < 0) {
+ start = 0;
+ end = qMax(0, start + end);
+ }
+
+ QTextCharFormat format = qvariant_cast<QTextFormat>(attribute.value).toCharFormat();
+
+ QColor underlineColor(0, 0, 0, 0);
+ if (format.underlineStyle() != QTextCharFormat::NoUnderline)
+ underlineColor = format.underlineColor();
+
+ QColor backgroundColor(0, 0, 0, 0);
+ if (format.background().style() != Qt::NoBrush)
+ backgroundColor = format.background().color();
+
+ underlines.push_back(blink::WebCompositionUnderline(start, end, toSk(underlineColor), /*thick*/ false, toSk(backgroundColor)));
break;
}
case QInputMethodEvent::Cursor:
@@ -1067,9 +1063,19 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
}
+ gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
+ : gfx::Range::InvalidRange();
+
+ auto setCompositionForPreEditString = [&](){
+ ensureValidSelectionRange();
+ m_host->ImeSetComposition(toString16(preeditString),
+ underlines,
+ replacementRange,
+ selectionRange.start(),
+ selectionRange.end());
+ };
+
if (!commitString.isEmpty()) {
- gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
- : gfx::Range::InvalidRange();
m_host->ImeConfirmComposition(toString16(commitString), replacementRange, false);
// We might get a commit string and a pre-edit string in a single event, which means
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 523d1c49d..d6c77fada 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -42,13 +42,12 @@
#include "render_widget_host_view_qt_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "cc/resources/transferable_resource.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
-#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
+#include "gpu/ipc/common/gpu_messages.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
#include "qtwebenginecoreglobal_p.h"
#include <QMap>
@@ -120,7 +119,6 @@ public:
virtual gfx::Vector2dF GetLastScrollOffset() const Q_DECL_OVERRIDE;
virtual gfx::Size GetPhysicalBackingSize() const Q_DECL_OVERRIDE;
virtual gfx::NativeView GetNativeView() const Q_DECL_OVERRIDE;
- virtual gfx::NativeViewId GetNativeViewId() const Q_DECL_OVERRIDE;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() Q_DECL_OVERRIDE;
virtual void Focus() Q_DECL_OVERRIDE;
virtual bool HasFocus() const Q_DECL_OVERRIDE;
@@ -132,10 +130,9 @@ public:
virtual void SetBackgroundColor(SkColor color) Q_DECL_OVERRIDE;
virtual bool LockMouse() Q_DECL_OVERRIDE;
virtual void UnlockMouse() Q_DECL_OVERRIDE;
- virtual void MovePluginWindows(const std::vector<content::WebPluginGeometry>&) Q_DECL_OVERRIDE;
virtual void UpdateCursor(const content::WebCursor&) Q_DECL_OVERRIDE;
virtual void SetIsLoading(bool) Q_DECL_OVERRIDE;
- virtual void TextInputStateChanged(const ViewHostMsg_TextInputState_Params&) Q_DECL_OVERRIDE;
+ virtual void TextInputStateChanged(const content::TextInputState& params) Q_DECL_OVERRIDE;
virtual void ImeCancelComposition() Q_DECL_OVERRIDE;
virtual void ImeCompositionRangeChanged(const gfx::Range&, const std::vector<gfx::Rect>&) Q_DECL_OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus, int) Q_DECL_OVERRIDE;
@@ -147,12 +144,12 @@ public:
virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE;
virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE;
- virtual void OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE;
+ virtual void OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame) Q_DECL_OVERRIDE;
+
virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE;
virtual gfx::Rect GetBoundsInRootWindow() Q_DECL_OVERRIDE;
virtual void ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) Q_DECL_OVERRIDE;
virtual void ClearCompositorFrame() Q_DECL_OVERRIDE;
- virtual bool GetScreenColorProfile(std::vector<char>*) Q_DECL_OVERRIDE;
virtual void LockCompositingSurface() Q_DECL_OVERRIDE;
virtual void UnlockCompositingSurface() Q_DECL_OVERRIDE;
@@ -184,26 +181,15 @@ public:
virtual void SetActive(bool active) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual bool IsSpeaking() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void SpeakSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual bool PostProcessEventForPluginIme(const content::NativeWebKeyboardEvent& event) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void StopSpeaking() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void SetWindowVisibility(bool visible) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual bool SupportsSpeech() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void ShowDefinitionForSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void WindowFrameChanged() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
+ virtual ui::AcceleratedWidgetMac *GetAcceleratedWidgetMac() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return nullptr; }
#endif // defined(OS_MACOSX)
-#if defined(OS_WIN)
-#if defined(USE_AURA)
- virtual void SetParentNativeViewAccessible(gfx::NativeViewAccessible accessible_parent) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual gfx::NativeViewId GetParentForWindowlessPlugin() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED return gfx::NativeViewId(); }
-#else
- virtual void SetClickthroughRegion(SkRegion *) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void WillWmDestroy(void) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
-#endif // defined(USE_AURA)
-#endif // defined(OS_WIN)
// Overridden from content::BrowserAccessibilityDelegate
- virtual content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate) Q_DECL_OVERRIDE;
+ virtual content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate, bool for_root_frame) Q_DECL_OVERRIDE;
#ifndef QT_NO_ACCESSIBILITY
virtual void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
#endif // QT_NO_ACCESSIBILITY
@@ -227,7 +213,7 @@ private:
bool m_touchMotionStarted;
QMap<int, int> m_touchIdMapping;
QList<QTouchEvent::TouchPoint> m_previousTouchPoints;
- scoped_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
+ std::unique_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
QExplicitlySharedDataPointer<ChromiumCompositorData> m_chromiumCompositorData;
cc::ReturnedResourceArray m_resourcesToRelease;
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h
index ce6ec730a..1e50c8f08 100644
--- a/src/core/render_widget_host_view_qt_delegate.h
+++ b/src/core/render_widget_host_view_qt_delegate.h
@@ -49,13 +49,25 @@ QT_BEGIN_NAMESPACE
class QCursor;
class QEvent;
class QPainter;
-class QSGImageNode;
class QSGLayer;
class QSGNode;
+class QSGRectangleNode;
class QSGTexture;
class QVariant;
class QWindow;
class QInputMethodEvent;
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+class QSGImageNode;
+typedef QSGImageNode QSGInternalImageNode;
+class QSGSimpleTextureNode;
+typedef QSGSimpleTextureNode QSGTextureNode;
+#else
+class QSGInternalImageNode;
+class QSGImageNode;
+typedef QSGImageNode QSGTextureNode;
+#endif
+
QT_END_NAMESPACE
namespace QtWebEngineCore {
@@ -92,13 +104,14 @@ public:
virtual QWindow* window() const = 0;
virtual QSGTexture *createTextureFromImage(const QImage &) = 0;
virtual QSGLayer *createLayer() = 0;
- virtual QSGImageNode *createImageNode() = 0;
+ virtual QSGInternalImageNode *createImageNode() = 0;
+ virtual QSGTextureNode *createTextureNode() = 0;
+ virtual QSGRectangleNode *createRectangleNode() = 0;
virtual void update() = 0;
virtual void updateCursor(const QCursor &) = 0;
virtual void resize(int width, int height) = 0;
virtual void move(const QPoint &) = 0;
virtual void inputMethodStateChanged(bool editorVisible) = 0;
- virtual void setTooltip(const QString &) = 0;
virtual void setClearColor(const QColor &color) = 0;
};
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 5d1780cbe..69f5bfefe 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -43,18 +43,18 @@
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/common/localized_error.h"
#if defined(ENABLE_SPELLCHECK)
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/spellchecker/spellcheck_provider.h"
#endif
-#include "components/cdm/renderer/widevine_key_systems.h"
+#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "components/error_page/common/error_page_params.h"
+#include "components/error_page/common/localized_error.h"
#if defined (ENABLE_BASIC_PRINTING)
#include "components/printing/renderer/print_web_view_helper.h"
#endif // if defined(ENABLE_BASIC_PRINTING)
#include "components/visitedlink/renderer/visitedlink_slave.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -76,7 +76,7 @@
#include "renderer/render_view_observer_qt.h"
#include "renderer/user_resource_controller.h"
-#include "grit/renderer_resources.h"
+#include "components/grit/components_resources.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@@ -85,17 +85,6 @@ namespace QtWebEngineCore {
static const char kHttpErrorDomain[] = "http";
static const char kQrcSchemeQt[] = "qrc";
-class RenderProcessObserverQt : public content::RenderProcessObserver {
-public:
- void WebKitInitialized() override
- {
- // Can only be done after blink is initialized.
- blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt));
- // mark qrc as a secure scheme (avoids deprecation warnings)
- blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme);
- }
-};
-
ContentRendererClientQt::ContentRendererClientQt()
{
}
@@ -108,23 +97,24 @@ void ContentRendererClientQt::RenderThreadStarted()
{
content::RenderThread *renderThread = content::RenderThread::Get();
m_visitedLinkSlave.reset(new visitedlink::VisitedLinkSlave);
- m_webCacheObserver.reset(new web_cache::WebCacheRenderProcessObserver());
- m_renderProcessObserver.reset(new RenderProcessObserverQt());
+ m_webCacheImpl.reset(new web_cache::WebCacheImpl());
renderThread->AddObserver(m_visitedLinkSlave.data());
- renderThread->AddObserver(m_webCacheObserver.data());
renderThread->AddObserver(UserResourceController::instance());
- renderThread->AddObserver(m_renderProcessObserver.data());
#if defined(ENABLE_SPELLCHECK)
m_spellCheck.reset(new SpellCheck());
renderThread->AddObserver(m_spellCheck.data());
#endif
+
+ blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt));
+ // mark qrc as a secure scheme (avoids deprecation warnings)
+ blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme);
}
void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view)
{
// RenderViewObservers destroy themselves with their RenderView.
- new RenderViewObserverQt(render_view, m_webCacheObserver.data());
+ new RenderViewObserverQt(render_view, m_webCacheImpl.data());
new WebChannelIPCTransport(render_view);
UserResourceController::instance()->renderViewCreated(render_view);
#if defined(ENABLE_SPELLCHECK)
@@ -133,9 +123,8 @@ void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view
#if defined(ENABLE_BASIC_PRINTING)
new printing::PrintWebViewHelper(
- render_view,
- scoped_ptr<printing::PrintWebViewHelper::Delegate>(
- new PrintWebViewHelperDelegateQt()));
+ render_view,
+ base::WrapUnique(new PrintWebViewHelperDelegateQt()));
#endif // defined(ENABLE_BASIC_PRINTING)
}
@@ -144,14 +133,38 @@ void ContentRendererClientQt::RenderFrameCreated(content::RenderFrame* render_fr
new QtWebEngineCore::RenderFrameObserverQt(render_frame);
}
+void ContentRendererClientQt::RunScriptsAtDocumentStart(content::RenderFrame* render_frame)
+{
+ // Check whether the render_frame has been created and has not been detached yet.
+ // Otherwise the WebFrame is not available.
+ RenderFrameObserverQt *render_frame_observer = RenderFrameObserverQt::Get(render_frame);
+ if (!render_frame_observer || render_frame_observer->isFrameDetached())
+ return; // The frame is invisible to scripts.
+
+ if (WebChannelIPCTransport *transport = WebChannelIPCTransport::Get(render_frame->GetRenderView()))
+ transport->RunScriptsAtDocumentStart(render_frame);
+ UserResourceController::instance()->RunScriptsAtDocumentStart(render_frame);
+}
+
+void ContentRendererClientQt::RunScriptsAtDocumentEnd(content::RenderFrame* render_frame)
+{
+ // Check whether the render_frame has been created and has not been detached yet.
+ // Otherwise the WebFrame is not available.
+ RenderFrameObserverQt *render_frame_observer = RenderFrameObserverQt::Get(render_frame);
+ if (!render_frame_observer || render_frame_observer->isFrameDetached())
+ return; // The frame is invisible to scripts.
+
+ UserResourceController::instance()->RunScriptsAtDocumentEnd(render_frame);
+}
+
bool ContentRendererClientQt::HasErrorPage(int httpStatusCode, std::string *errorDomain)
{
// Use an internal error page, if we have one for the status code.
- if (!LocalizedError::HasStrings(LocalizedError::kHttpErrorDomain, httpStatusCode)) {
+ if (!error_page::LocalizedError::HasStrings(error_page::LocalizedError::kHttpErrorDomain, httpStatusCode)) {
return false;
}
- *errorDomain = LocalizedError::kHttpErrorDomain;
+ *errorDomain = error_page::LocalizedError::kHttpErrorDomain;
return true;
}
@@ -173,9 +186,10 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* re
const std::string locale = content::RenderThread::Get()->GetLocale();
// TODO(elproxy): We could potentially get better diagnostics here by first calling
// NetErrorHelper::GetErrorStringsForDnsProbe, but that one is harder to untangle.
- LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
- , error.staleCopyInCache && !isPost, false, error_page::OfflinePageStatus::NONE, locale, renderFrame->GetRenderView()->GetAcceptLanguages()
- , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
+
+ error_page::LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
+ , error.staleCopyInCache && !isPost, false, false, locale
+ , std::unique_ptr<error_page::ErrorPageParams>(), &errorStrings);
resourceId = IDR_NET_ERROR_HTML;
@@ -187,7 +201,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* re
}
if (errorDescription)
- *errorDescription = LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost);
+ *errorDescription = error_page::LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost);
}
unsigned long long ContentRendererClientQt::VisitedLinkHash(const char *canonicalUrl, size_t length)
@@ -206,6 +220,8 @@ bool ContentRendererClientQt::IsLinkVisited(unsigned long long linkHash)
// found in the LICENSE file.
#if defined(ENABLE_PEPPER_CDMS)
+static const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm";
+
static bool IsPepperCdmAvailable(const std::string& pepper_type,
std::vector<base::string16>* additional_param_names,
std::vector<base::string16>* additional_param_values)
@@ -221,21 +237,94 @@ static bool IsPepperCdmAvailable(const std::string& pepper_type,
return is_available;
}
+// KeySystemProperties implementation for external Clear Key systems.
+class ExternalClearKeyProperties : public media::KeySystemProperties
+{
+public:
+ explicit ExternalClearKeyProperties(const std::string& key_system_name)
+ : key_system_name_(key_system_name) {}
+
+ std::string GetKeySystemName() const override { return key_system_name_; }
+ bool IsSupportedInitDataType(media::EmeInitDataType init_data_type) const override
+ {
+ switch (init_data_type) {
+ case media::EmeInitDataType::WEBM:
+ case media::EmeInitDataType::KEYIDS:
+ return true;
+
+ case media::EmeInitDataType::CENC:
+#if defined(USE_PROPRIETARY_CODECS)
+ return true;
+#else
+ return false;
+#endif // defined(USE_PROPRIETARY_CODECS)
+
+ case media::EmeInitDataType::UNKNOWN:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+ }
+
+ media::SupportedCodecs GetSupportedCodecs() const override
+ {
+#if defined(USE_PROPRIETARY_CODECS)
+ return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
+#else
+ return media::EME_CODEC_WEBM_ALL;
+#endif
+ }
+
+ media::EmeConfigRule GetRobustnessConfigRule(
+ media::EmeMediaType media_type,
+ const std::string& requested_robustness) const override
+ {
+ return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
+ : media::EmeConfigRule::NOT_SUPPORTED;
+ }
+
+ // Persistent license sessions are faked.
+ media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override
+ {
+ return media::EmeSessionTypeSupport::SUPPORTED;
+ }
+
+ media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport() const override {
+ return media::EmeSessionTypeSupport::NOT_SUPPORTED;
+ }
+
+ media::EmeFeatureSupport GetPersistentStateSupport() const override
+ {
+ return media::EmeFeatureSupport::REQUESTABLE;
+ }
+
+ media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override
+ {
+ return media::EmeFeatureSupport::NOT_SUPPORTED;
+ }
+
+ std::string GetPepperType() const override
+ {
+ return kExternalClearKeyPepperType;
+ }
+
+private:
+ const std::string key_system_name_;
+};
+
// External Clear Key (used for testing).
-static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddExternalClearKey(std::vector<std::unique_ptr<media::KeySystemProperties>>* concrete_key_systems)
{
- static const char kExternalClearKeyKeySystem[] =
- "org.chromium.externalclearkey";
- static const char kExternalClearKeyDecryptOnlyKeySystem[] =
- "org.chromium.externalclearkey.decryptonly";
- static const char kExternalClearKeyFileIOTestKeySystem[] =
- "org.chromium.externalclearkey.fileiotest";
- static const char kExternalClearKeyInitializeFailKeySystem[] =
- "org.chromium.externalclearkey.initializefail";
- static const char kExternalClearKeyCrashKeySystem[] =
- "org.chromium.externalclearkey.crash";
- static const char kExternalClearKeyPepperType[] =
- "application/x-ppapi-clearkey-cdm";
+ static const char kExternalClearKeyKeySystem[] =
+ "org.chromium.externalclearkey";
+ static const char kExternalClearKeyDecryptOnlyKeySystem[] =
+ "org.chromium.externalclearkey.decryptonly";
+ static const char kExternalClearKeyFileIOTestKeySystem[] =
+ "org.chromium.externalclearkey.fileiotest";
+ static const char kExternalClearKeyInitializeFailKeySystem[] =
+ "org.chromium.externalclearkey.initializefail";
+ static const char kExternalClearKeyCrashKeySystem[] =
+ "org.chromium.externalclearkey.crash";
std::vector<base::string16> additional_param_names;
std::vector<base::string16> additional_param_values;
@@ -244,53 +333,31 @@ static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_
&additional_param_values))
return;
- media::KeySystemInfo info;
- info.key_system = kExternalClearKeyKeySystem;
-
- info.supported_init_data_types =
- media::kInitDataTypeMaskWebM | media::kInitDataTypeMaskKeyIds;
- info.supported_codecs = media::EME_CODEC_WEBM_ALL;
-#if defined(USE_PROPRIETARY_CODECS)
- info.supported_init_data_types |= media::kInitDataTypeMaskCenc;
- info.supported_codecs |= media::EME_CODEC_MP4_ALL;
-#endif // defined(USE_PROPRIETARY_CODECS)
-
- info.max_audio_robustness = media::EmeRobustness::EMPTY;
- info.max_video_robustness = media::EmeRobustness::EMPTY;
-
- // Persistent sessions are faked.
- info.persistent_license_support = media::EmeSessionTypeSupport::SUPPORTED;
- info.persistent_release_message_support =
- media::EmeSessionTypeSupport::NOT_SUPPORTED;
- info.persistent_state_support = media::EmeFeatureSupport::REQUESTABLE;
- info.distinctive_identifier_support = media::EmeFeatureSupport::NOT_SUPPORTED;
-
- info.pepper_type = kExternalClearKeyPepperType;
-
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
// Add support of decrypt-only mode in ClearKeyCdm.
- info.key_system = kExternalClearKeyDecryptOnlyKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
// A key system that triggers FileIO test in ClearKeyCdm.
- info.key_system = kExternalClearKeyFileIOTestKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
// A key system that Chrome thinks is supported by ClearKeyCdm, but actually
// will be refused by ClearKeyCdm. This is to test the CDM initialization
// failure case.
- info.key_system = kExternalClearKeyInitializeFailKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
// A key system that triggers a crash in ClearKeyCdm.
- info.key_system = kExternalClearKeyCrashKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
}
#if defined(WIDEVINE_CDM_AVAILABLE)
-static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddPepperBasedWidevine(std::vector<std::unique_ptr<media::KeySystemProperties>> *concrete_key_systems)
{
//#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
// Version glibc_version(gnu_get_libc_version());
@@ -319,26 +386,26 @@ static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_k
supported_codecs |= media::EME_CODEC_MP4_AAC;
#endif // defined(USE_PROPRIETARY_CODECS)
- cdm::AddWidevineWithCodecs(
- cdm::WIDEVINE, supported_codecs,
- media::EmeRobustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
- media::EmeRobustness::SW_SECURE_DECODE, // Maximum video robustness.
+ using Robustness = cdm::WidevineKeySystemProperties::Robustness;
+ concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
+ supported_codecs,
+ Robustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
+ Robustness::SW_SECURE_DECODE, // Maximum video robustness.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message.
- media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
- media::EmeFeatureSupport::NOT_SUPPORTED, // Distinctive identifier.
- concrete_key_systems);
+ media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
+ media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
-void ContentRendererClientQt::AddKeySystems(std::vector<media::KeySystemInfo>* key_systems_info)
+void ContentRendererClientQt::AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>> *key_systems)
{
#if defined(ENABLE_PEPPER_CDMS)
- AddExternalClearKey(key_systems_info);
+ AddExternalClearKey(key_systems);
#if defined(WIDEVINE_CDM_AVAILABLE)
- AddPepperBasedWidevine(key_systems_info);
+ AddPepperBasedWidevine(key_systems);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
}
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index d475c7801..72b4e4061 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -44,16 +44,12 @@
#include <QtGlobal>
#include <QScopedPointer>
-namespace content {
-class RenderProcessObserver;
-}
-
namespace visitedlink {
class VisitedLinkSlave;
}
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
#if defined(ENABLE_SPELLCHECK)
@@ -76,12 +72,14 @@ public:
virtual unsigned long long VisitedLinkHash(const char *canonicalUrl, size_t length) Q_DECL_OVERRIDE;
virtual bool IsLinkVisited(unsigned long long linkHash) Q_DECL_OVERRIDE;
- virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) Q_DECL_OVERRIDE;
+ virtual void AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) Q_DECL_OVERRIDE;
+
+ virtual void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
+ virtual void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
private:
QScopedPointer<visitedlink::VisitedLinkSlave> m_visitedLinkSlave;
- QScopedPointer<web_cache::WebCacheRenderProcessObserver> m_webCacheObserver;
- QScopedPointer<content::RenderProcessObserver> m_renderProcessObserver;
+ QScopedPointer<web_cache::WebCacheImpl> m_webCacheImpl;
#if defined(ENABLE_SPELLCHECK)
QScopedPointer<SpellCheck> m_spellCheck;
#endif
diff --git a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp b/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp
deleted file mode 100644
index c1782844d..000000000
--- a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtWebEngine module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// based on chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "pepper_flash_clipboard_message_filter_qt.h"
-
-#include "base/pickle.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/public/browser/browser_thread.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_macros.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_flash_clipboard.h"
-#include "ppapi/host/dispatch_host_message.h"
-#include "ppapi/host/host_message_context.h"
-#include "ppapi/host/ppapi_host.h"
-#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/resource_message_params.h"
-#include "ui/base/clipboard/scoped_clipboard_writer.h"
-
-using content::BrowserThread;
-
-namespace QtWebEngineCore {
-
-namespace {
-
-const size_t kMaxClipboardWriteSize = 1000000;
-
-ui::ClipboardType ConvertClipboardType(uint32_t type)
-{
- switch (type) {
- case PP_FLASH_CLIPBOARD_TYPE_STANDARD:
- return ui::CLIPBOARD_TYPE_COPY_PASTE;
- case PP_FLASH_CLIPBOARD_TYPE_SELECTION:
- return ui::CLIPBOARD_TYPE_SELECTION;
- }
- NOTREACHED();
- return ui::CLIPBOARD_TYPE_COPY_PASTE;
-}
-
-// Functions to pack/unpack custom data from a pickle. See the header file for
-// more detail on custom formats in Pepper.
-// TODO(raymes): Currently pepper custom formats are stored in their own
-// native format type. However we should be able to store them in the same way
-// as "Web Custom" formats are. This would allow clipboard data to be shared
-// between pepper applications and web applications. However currently web apps
-// assume all data that is placed on the clipboard is UTF16 and pepper allows
-// arbitrary data so this change would require some reworking of the chrome
-// clipboard interface for custom data.
-bool JumpToFormatInPickle(const base::string16& format, base::PickleIterator* iter)
-{
- size_t size = 0;
- if (!iter->ReadSizeT(&size))
- return false;
- for (size_t i = 0; i < size; ++i) {
- base::string16 stored_format;
- if (!iter->ReadString16(&stored_format))
- return false;
- if (stored_format == format)
- return true;
- int skip_length;
- if (!iter->ReadLength(&skip_length))
- return false;
- if (!iter->SkipBytes(skip_length))
- return false;
- }
- return false;
-}
-
-bool IsFormatAvailableInPickle(const base::string16& format, const base::Pickle& pickle)
-{
- base::PickleIterator iter(pickle);
- return JumpToFormatInPickle(format, &iter);
-}
-
-std::string ReadDataFromPickle(const base::string16& format, const base::Pickle& pickle)
-{
- std::string result;
- base::PickleIterator iter(pickle);
- if (!JumpToFormatInPickle(format, &iter) || !iter.ReadString(&result))
- return std::string();
- return result;
-}
-
-bool WriteDataToPickle(const std::map<base::string16, std::string>& data, base::Pickle* pickle)
-{
- pickle->WriteSizeT(data.size());
- for (std::map<base::string16, std::string>::const_iterator it = data.begin(); it != data.end(); ++it) {
- if (!pickle->WriteString16(it->first))
- return false;
- if (!pickle->WriteString(it->second))
- return false;
- }
- return true;
-}
-
-} // namespace
-
-PepperFlashClipboardMessageFilter::PepperFlashClipboardMessageFilter() {}
-
-PepperFlashClipboardMessageFilter::~PepperFlashClipboardMessageFilter() {}
-
-scoped_refptr<base::TaskRunner>
-PepperFlashClipboardMessageFilter::OverrideTaskRunnerForMessage(const IPC::Message& msg)
-{
- // Clipboard writes should always occur on the UI thread due to the
- // restrictions of various platform APIs. In general, the clipboard is not
- // thread-safe, so all clipboard calls should be serviced from the UI thread.
- if (msg.type() == PpapiHostMsg_FlashClipboard_WriteData::ID)
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
-
- // Windows needs clipboard reads to be serviced from the IO thread because
- // these are sync IPCs which can result in deadlocks with plugins if serviced
- // from the UI thread. Note that Windows clipboard calls ARE thread-safe so it
- // is ok for reads and writes to be serviced from different threads.
-#if !defined(OS_WIN)
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
-#else
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
-#endif
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnResourceMessageReceived(const IPC::Message& msg,
- ppapi::host::HostMessageContext* context)
-{
- PPAPI_BEGIN_MESSAGE_MAP(PepperFlashClipboardMessageFilter, msg)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_RegisterCustomFormat,
- OnMsgRegisterCustomFormat)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_IsFormatAvailable,
- OnMsgIsFormatAvailable)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_ReadData,
- OnMsgReadData)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_WriteData,
- OnMsgWriteData)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_GetSequenceNumber,
- OnMsgGetSequenceNumber)
- PPAPI_END_MESSAGE_MAP()
- return PP_ERROR_FAILED;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgRegisterCustomFormat(
- ppapi::host::HostMessageContext* host_context,
- const std::string& format_name)
-{
- uint32_t format = m_custom_formats.RegisterFormat(format_name);
- if (format == PP_FLASH_CLIPBOARD_FORMAT_INVALID)
- return PP_ERROR_FAILED;
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply(format);
- return PP_OK;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgIsFormatAvailable(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- bool available = false;
- switch (format) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT: {
- bool plain = clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(), type);
- bool plainw = clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), type);
- available = plain || plainw;
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_HTML:
- available = clipboard->IsFormatAvailable(ui::Clipboard::GetHtmlFormatType(), type);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_RTF:
- available = clipboard->IsFormatAvailable(ui::Clipboard::GetRtfFormatType(), type);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(format)) {
- std::string format_name = m_custom_formats.GetFormatName(format);
- std::string clipboard_data;
- clipboard->ReadData(ui::Clipboard::GetPepperCustomDataFormatType(), &clipboard_data);
- base::Pickle pickle(clipboard_data.data(), clipboard_data.size());
- available = IsFormatAvailableInPickle(base::UTF8ToUTF16(format_name), pickle);
- }
- break;
- }
-
- return available ? PP_OK : PP_ERROR_FAILED;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgReadData(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- std::string clipboard_string;
- int32_t result = PP_ERROR_FAILED;
- switch (format) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT: {
- if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), type)) {
- base::string16 text;
- clipboard->ReadText(type, &text);
- if (!text.empty()) {
- result = PP_OK;
- clipboard_string = base::UTF16ToUTF8(text);
- break;
- }
- }
- // If the PlainTextW format isn't available or is empty, take the
- // ASCII text format.
- if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(), type)) {
- result = PP_OK;
- clipboard->ReadAsciiText(type, &clipboard_string);
- }
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_HTML: {
- if (!clipboard->IsFormatAvailable(ui::Clipboard::GetHtmlFormatType(), type)) {
- break;
- }
-
- base::string16 html;
- std::string url;
- uint32_t fragment_start;
- uint32_t fragment_end;
- clipboard->ReadHTML(type, &html, &url, &fragment_start, &fragment_end);
- result = PP_OK;
- clipboard_string = base::UTF16ToUTF8(html.substr(fragment_start, fragment_end - fragment_start));
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_RTF: {
- if (!clipboard->IsFormatAvailable(ui::Clipboard::GetRtfFormatType(), type)) {
- break;
- }
- result = PP_OK;
- clipboard->ReadRTF(type, &clipboard_string);
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(format)) {
- base::string16 format_name =
- base::UTF8ToUTF16(m_custom_formats.GetFormatName(format));
- std::string clipboard_data;
- clipboard->ReadData(ui::Clipboard::GetPepperCustomDataFormatType(),
- &clipboard_data);
- base::Pickle pickle(clipboard_data.data(), clipboard_data.size());
- if (IsFormatAvailableInPickle(format_name, pickle)) {
- result = PP_OK;
- clipboard_string = ReadDataFromPickle(format_name, pickle);
- }
- }
- break;
- }
-
- if (result == PP_OK) {
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_ReadDataReply(clipboard_string);
- }
- return result;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgWriteData(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- const std::vector<uint32_t>& formats,
- const std::vector<std::string>& data)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
- if (formats.size() != data.size())
- return PP_ERROR_FAILED;
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- // If no formats are passed in clear the clipboard.
- if (formats.size() == 0) {
- clipboard->Clear(type);
- return PP_OK;
- }
-
- ui::ScopedClipboardWriter scw(type);
- std::map<base::string16, std::string> custom_data_map;
- int32_t res = PP_OK;
- for (uint32_t i = 0; i < formats.size(); ++i) {
- if (data[i].length() > kMaxClipboardWriteSize) {
- res = PP_ERROR_NOSPACE;
- break;
- }
-
- switch (formats[i]) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT:
- scw.WriteText(base::UTF8ToUTF16(data[i]));
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_HTML:
- scw.WriteHTML(base::UTF8ToUTF16(data[i]), std::string());
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_RTF:
- scw.WriteRTF(data[i]);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- res = PP_ERROR_BADARGUMENT;
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(formats[i])) {
- std::string format_name = m_custom_formats.GetFormatName(formats[i]);
- custom_data_map[base::UTF8ToUTF16(format_name)] = data[i];
- } else {
- // Invalid format.
- res = PP_ERROR_BADARGUMENT;
- break;
- }
- }
-
- if (res != PP_OK)
- break;
- }
-
- if (custom_data_map.size() > 0) {
- base::Pickle pickle;
- if (WriteDataToPickle(custom_data_map, &pickle)) {
- scw.WritePickledData(pickle, ui::Clipboard::GetPepperCustomDataFormatType());
- } else {
- res = PP_ERROR_BADARGUMENT;
- }
- }
-
- if (res != PP_OK) {
- // Need to clear the objects so nothing is written.
- scw.Reset();
- }
-
- return res;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgGetSequenceNumber(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- int64_t sequence_number = clipboard->GetSequenceNumber(type);
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply(sequence_number);
- return PP_OK;
-}
-
-} // namespace QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h b/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h
deleted file mode 100644
index c00e668ea..000000000
--- a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtWebEngine module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// based on chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
-#define PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
-
-#include <string>
-#include <vector>
-
-#include "base/compiler_specific.h"
-#include "ppapi/host/resource_message_filter.h"
-#include "ppapi/shared_impl/flash_clipboard_format_registry.h"
-
-namespace ppapi {
-namespace host {
-struct HostMessageContext;
-}
-}
-
-namespace ui {
-class ScopedClipboardWriter;
-}
-
-namespace QtWebEngineCore {
-
-// Resource message filter for accessing the clipboard in Pepper. Pepper
-// supports reading/writing custom formats from the clipboard. Currently, all
-// custom formats that are read/written from the clipboard through pepper are
-// stored in a single real clipboard format (in the same way the "web custom"
-// clipboard formats are). This is done so that we don't have to have use real
-// clipboard types for each custom clipboard format which may be a limited
-// resource on a particular platform.
-class PepperFlashClipboardMessageFilter : public ppapi::host::ResourceMessageFilter {
-public:
- PepperFlashClipboardMessageFilter();
-
-protected:
- // ppapi::host::ResourceMessageFilter overrides.
- scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(const IPC::Message& msg) override;
- int32_t OnResourceMessageReceived(const IPC::Message& msg, ppapi::host::HostMessageContext* context) override;
-
-private:
- ~PepperFlashClipboardMessageFilter() override;
-
- int32_t OnMsgRegisterCustomFormat(ppapi::host::HostMessageContext* host_context, const std::string& format_name);
- int32_t OnMsgIsFormatAvailable(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format);
- int32_t OnMsgReadData(ppapi::host::HostMessageContext* host_context,
- uint32_t clipoard_type,
- uint32_t format);
- int32_t OnMsgWriteData(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- const std::vector<uint32_t>& formats,
- const std::vector<std::string>& data);
- int32_t OnMsgGetSequenceNumber(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type);
-
- int32_t WriteClipboardDataItem(uint32_t format,
- const std::string& data,
- ui::ScopedClipboardWriter* scw);
-
- ppapi::FlashClipboardFormatRegistry m_custom_formats;
-
- DISALLOW_COPY_AND_ASSIGN(PepperFlashClipboardMessageFilter);
-};
-
-} // namespace QtWebEngineCore
-
-#endif // PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
diff --git a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
index 37ce4b5f3..a46454407 100644
--- a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
+++ b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
@@ -250,6 +250,83 @@ int32_t PepperFlashRendererHostQt::OnDrawGlyphs(
params.glyph_indices.empty())
return PP_ERROR_FAILED;
+ int style = SkTypeface::kNormal;
+ if (static_cast<PP_BrowserFont_Trusted_Weight>(params.font_desc.weight) >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD)
+ style |= SkTypeface::kBold;
+ if (params.font_desc.italic)
+ style |= SkTypeface::kItalic;
+ sk_sp<SkTypeface> typeface(SkTypeface::MakeFromName(params.font_desc.face.c_str(), SkFontStyle::FromOldStyle(style)));
+ if (!typeface)
+ return PP_ERROR_FAILED;
+
+ EnterResourceNoLock<PPB_ImageData_API> enter(params.image_data.host_resource(), true);
+ if (enter.failed())
+ return PP_ERROR_FAILED;
+
+ PPB_ImageData_API* image = static_cast<PPB_ImageData_API*>(enter.object());
+ SkCanvas* canvas = image->GetCanvas();
+ bool needs_unmapping = false;
+ if (!canvas) {
+ needs_unmapping = true;
+ image->Map();
+ canvas = image->GetCanvas();
+ if (!canvas)
+ return PP_ERROR_FAILED; // Failure mapping.
+ }
+
+ SkAutoCanvasRestore acr(canvas, true);
+
+ // Clip is applied in pixels before the transform.
+ SkRect clip_rect = {
+ SkIntToScalar(params.clip.point.x), SkIntToScalar(params.clip.point.y),
+ SkIntToScalar(params.clip.point.x + params.clip.size.width),
+ SkIntToScalar(params.clip.point.y + params.clip.size.height)};
+ canvas->clipRect(clip_rect);
+
+ SkMatrix matrix;
+ matrix.set(SkMatrix::kMScaleX, SkFloatToScalar(params.transformation[0][0]));
+ matrix.set(SkMatrix::kMSkewX, SkFloatToScalar(params.transformation[0][1]));
+ matrix.set(SkMatrix::kMTransX, SkFloatToScalar(params.transformation[0][2]));
+ matrix.set(SkMatrix::kMSkewY, SkFloatToScalar(params.transformation[1][0]));
+ matrix.set(SkMatrix::kMScaleY, SkFloatToScalar(params.transformation[1][1]));
+ matrix.set(SkMatrix::kMTransY, SkFloatToScalar(params.transformation[1][2]));
+ matrix.set(SkMatrix::kMPersp0, SkFloatToScalar(params.transformation[2][0]));
+ matrix.set(SkMatrix::kMPersp1, SkFloatToScalar(params.transformation[2][1]));
+ matrix.set(SkMatrix::kMPersp2, SkFloatToScalar(params.transformation[2][2]));
+ canvas->concat(matrix);
+
+ SkPaint paint;
+ paint.setColor(params.color);
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ paint.setAntiAlias(true);
+ paint.setHinting(SkPaint::kFull_Hinting);
+ paint.setTextSize(SkIntToScalar(params.font_desc.size));
+ paint.setTypeface(std::move(typeface));
+ if (params.allow_subpixel_aa) {
+ paint.setSubpixelText(true);
+ paint.setLCDRenderText(true);
+ }
+
+ SkScalar x = SkIntToScalar(params.position.x);
+ SkScalar y = SkIntToScalar(params.position.y);
+
+ // Build up the skia advances.
+ size_t glyph_count = params.glyph_indices.size();
+ if (glyph_count) {
+ std::vector<SkPoint> sk_positions(glyph_count);
+ for (uint32_t i = 0; i < glyph_count; i++) {
+ sk_positions[i].set(x, y);
+ x += SkFloatToScalar(params.glyph_advances[i].x);
+ y += SkFloatToScalar(params.glyph_advances[i].y);
+ }
+
+ canvas->drawPosText(
+ &params.glyph_indices[0], glyph_count * 2, &sk_positions[0], paint);
+ }
+
+ if (needs_unmapping)
+ image->Unmap();
+
return PP_OK;
}
diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
index 636ca12f1..febde84f7 100644
--- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
+++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
@@ -44,6 +44,9 @@
#include "pepper_renderer_host_factory_qt.h"
#include "pepper_flash_renderer_host_qt.h"
+
+#include "base/memory/ptr_util.h"
+#include "chrome/renderer/pepper/pepper_flash_font_file_host.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
@@ -63,7 +66,7 @@ PepperRendererHostFactoryQt::~PepperRendererHostFactoryQt()
{
}
-scoped_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourceHost(
+std::unique_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
@@ -72,16 +75,47 @@ scoped_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourc
DCHECK_EQ(host_->GetPpapiHost(), host);
if (!host_->IsValidInstance(instance))
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
+
+ if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)) {
+ switch (message.type()) {
+ case PpapiHostMsg_Flash_Create::ID:
+ return base::WrapUnique(new PepperFlashRendererHostQt(host_, instance, resource));
+ case PpapiHostMsg_FlashFullscreen_Create::ID:
+ case PpapiHostMsg_FlashMenu_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
+ // TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
+ // We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
+ // rid of its use in PDF if possible.
if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)
- && message.type() == PpapiHostMsg_Flash_Create::ID)
- return scoped_ptr<ppapi::host::ResourceHost>(
- new PepperFlashRendererHostQt(host_,
- instance,
- resource));
+ || host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+ switch (message.type()) {
+ case PpapiHostMsg_FlashFontFile_Create::ID: {
+ ppapi::proxy::SerializedFontDescription description;
+ PP_PrivateFontCharset charset;
+ if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>(message, &description, &charset))
+ return base::WrapUnique(new PepperFlashFontFileHost(host_, instance, resource, description, charset));
+ break;
+ }
+ case PpapiHostMsg_FlashDRM_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
+
+ if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+ switch (message.type()) {
+ case PpapiHostMsg_PDF_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
}
} // QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
index bc472a7c6..ec3440a08 100644
--- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
+++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
@@ -56,7 +56,7 @@ public:
~PepperRendererHostFactoryQt();
// HostFactory.
- scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+ std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
diff --git a/src/core/renderer/render_frame_observer_qt.cpp b/src/core/renderer/render_frame_observer_qt.cpp
index f2285f298..53e9407db 100644
--- a/src/core/renderer/render_frame_observer_qt.cpp
+++ b/src/core/renderer/render_frame_observer_qt.cpp
@@ -44,16 +44,19 @@
#include "render_frame_observer_qt.h"
+#include "base/memory/ptr_util.h"
+#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "renderer/pepper/pepper_renderer_host_factory_qt.h"
-#include "renderer/pepper/pepper_flash_renderer_host_qt.h"
namespace QtWebEngineCore {
RenderFrameObserverQt::RenderFrameObserverQt(content::RenderFrame* render_frame)
: RenderFrameObserver(render_frame)
+ , RenderFrameObserverTracker<RenderFrameObserverQt>(render_frame)
+ , m_isFrameDetached(false)
{
}
@@ -65,9 +68,20 @@ RenderFrameObserverQt::~RenderFrameObserverQt()
void RenderFrameObserverQt::DidCreatePepperPlugin(content::RendererPpapiHost* host)
{
host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(
- new PepperRendererHostFactoryQt(host)));
+ base::WrapUnique(new PepperRendererHostFactoryQt(host)));
+ host->GetPpapiHost()->AddInstanceMessageFilter(
+ base::WrapUnique(new PepperSharedMemoryMessageFilter(host)));
}
#endif
+void RenderFrameObserverQt::FrameDetached()
+{
+ m_isFrameDetached = true;
+}
+
+bool RenderFrameObserverQt::isFrameDetached() const
+{
+ return m_isFrameDetached;
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/render_frame_observer_qt.h b/src/core/renderer/render_frame_observer_qt.h
index b1d59d8c5..b74be5cd1 100644
--- a/src/core/renderer/render_frame_observer_qt.h
+++ b/src/core/renderer/render_frame_observer_qt.h
@@ -42,6 +42,7 @@
#include "base/compiler_specific.h"
#include "content/public/renderer/render_frame_observer.h"
+#include "content/public/renderer/render_frame_observer_tracker.h"
namespace content {
@@ -50,7 +51,10 @@ class RenderFrame;
namespace QtWebEngineCore {
-class RenderFrameObserverQt : public content::RenderFrameObserver {
+class RenderFrameObserverQt
+ : public content::RenderFrameObserver
+ , public content::RenderFrameObserverTracker<RenderFrameObserverQt>
+{
public:
explicit RenderFrameObserverQt(content::RenderFrame* render_frame);
~RenderFrameObserverQt();
@@ -58,9 +62,15 @@ public:
#if defined(ENABLE_PLUGINS)
void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;
#endif
+ void OnDestruct() override { }
+ void FrameDetached() override;
+
+ bool isFrameDetached() const;
private:
DISALLOW_COPY_AND_ASSIGN(RenderFrameObserverQt);
+
+ bool m_isFrameDetached;
};
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/render_view_observer_qt.cpp b/src/core/renderer/render_view_observer_qt.cpp
index 4b44a9bd9..393b4752c 100644
--- a/src/core/renderer/render_view_observer_qt.cpp
+++ b/src/core/renderer/render_view_observer_qt.cpp
@@ -41,40 +41,46 @@
#include "common/qt_messages.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
+#include "third_party/WebKit/public/web/WebFrameWidget.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
RenderViewObserverQt::RenderViewObserverQt(
content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer)
+ web_cache::WebCacheImpl* web_cache_impl)
: content::RenderViewObserver(render_view)
- , m_web_cache_render_process_observer(web_cache_render_process_observer)
+ , m_web_cache_impl(web_cache_impl)
{
}
void RenderViewObserverQt::onFetchDocumentMarkup(quint64 requestId)
{
- Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(
- routing_id(),
- requestId,
- render_view()->GetWebView()->mainFrame()->contentAsMarkup()));
+ blink::WebString markup;
+ if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame())
+ markup = blink::WebFrameContentDumper::dumpAsMarkup(
+ static_cast<blink::WebLocalFrame*>(render_view()->GetWebView()->mainFrame()));
+ Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(routing_id(), requestId, markup));
}
void RenderViewObserverQt::onFetchDocumentInnerText(quint64 requestId)
{
- Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(
- routing_id(),
- requestId,
- render_view()->GetWebView()->mainFrame()->contentAsText(std::numeric_limits<std::size_t>::max())));
+ blink::WebString text;
+ if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame())
+ text = blink::WebFrameContentDumper::dumpWebViewAsText(
+ render_view()->GetWebView(),
+ std::numeric_limits<std::size_t>::max());
+ Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(routing_id(), requestId, text));
}
void RenderViewObserverQt::onSetBackgroundColor(quint32 color)
{
- render_view()->GetWebView()->setBaseBackgroundColor(color);
+ render_view()->GetWebFrameWidget()->setBaseBackgroundColor(color);
}
void RenderViewObserverQt::OnFirstVisuallyNonEmptyLayout()
@@ -96,6 +102,6 @@ bool RenderViewObserverQt::OnMessageReceived(const IPC::Message& message)
void RenderViewObserverQt::Navigate(const GURL &)
{
- if (m_web_cache_render_process_observer)
- m_web_cache_render_process_observer->ExecutePendingClearCache();
+ if (m_web_cache_impl)
+ m_web_cache_impl->ExecutePendingClearCache();
}
diff --git a/src/core/renderer/render_view_observer_qt.h b/src/core/renderer/render_view_observer_qt.h
index 4839ae064..b62c815af 100644
--- a/src/core/renderer/render_view_observer_qt.h
+++ b/src/core/renderer/render_view_observer_qt.h
@@ -44,13 +44,13 @@
#include <QtGlobal>
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
class RenderViewObserverQt : public content::RenderViewObserver {
public:
RenderViewObserverQt(content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer);
+ web_cache::WebCacheImpl* web_cache_impl);
private:
void onFetchDocumentMarkup(quint64 requestId);
@@ -58,11 +58,12 @@ private:
void onSetBackgroundColor(quint32 color);
void OnFirstVisuallyNonEmptyLayout() Q_DECL_OVERRIDE;
+ void OnDestruct() Q_DECL_OVERRIDE { }
virtual bool OnMessageReceived(const IPC::Message& message) Q_DECL_OVERRIDE;
virtual void Navigate(const GURL& url) Q_DECL_OVERRIDE;
- web_cache::WebCacheRenderProcessObserver* m_web_cache_render_process_observer;
+ web_cache::WebCacheImpl* m_web_cache_impl;
DISALLOW_COPY_AND_ASSIGN(RenderViewObserverQt);
};
diff --git a/src/core/renderer/user_resource_controller.cpp b/src/core/renderer/user_resource_controller.cpp
index 30a04958f..8c603b805 100644
--- a/src/core/renderer/user_resource_controller.cpp
+++ b/src/core/renderer/user_resource_controller.cpp
@@ -39,8 +39,12 @@
#include "user_resource_controller.h"
+#include "base/strings/pattern.h"
+#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_observer.h"
+#include "extensions/common/url_pattern.h"
+#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -48,6 +52,8 @@
#include "common/qt_messages.h"
#include "common/user_script_data.h"
+#include "type_conversion.h"
+#include "user_script.h"
Q_GLOBAL_STATIC(UserResourceController, qt_webengine_userResourceController)
@@ -56,13 +62,46 @@ static content::RenderView * const globalScriptsIndex = 0;
// Scripts meant to run after the load event will be run 500ms after DOMContentLoaded if the load event doesn't come within that delay.
static const int afterLoadTimeout = 500;
+static bool scriptMatchesURL(const UserScriptData &scriptData, const GURL &url) {
+ // Logic taken from Chromium (extensions/common/user_script.cc)
+ bool matchFound;
+ if (!scriptData.urlPatterns.empty()) {
+ matchFound = false;
+ for (auto it = scriptData.urlPatterns.begin(), end = scriptData.urlPatterns.end(); it != end; ++it) {
+ URLPattern urlPattern(QtWebEngineCore::UserScript::validUserScriptSchemes(), *it);
+ if (urlPattern.MatchesURL(url))
+ matchFound = true;
+ }
+ if (!matchFound)
+ return false;
+ }
+
+ if (!scriptData.globs.empty()) {
+ matchFound = false;
+ for (auto it = scriptData.globs.begin(), end = scriptData.globs.end(); it != end; ++it) {
+ if (base::MatchPattern(url.spec(), *it))
+ matchFound = true;
+ }
+ if (!matchFound)
+ return false;
+ }
+
+ if (!scriptData.excludeGlobs.empty()) {
+ for (auto it = scriptData.excludeGlobs.begin(), end = scriptData.excludeGlobs.end(); it != end; ++it) {
+ if (base::MatchPattern(url.spec(), *it))
+ return false;
+ }
+ }
+
+ return true;
+}
+
class UserResourceController::RenderViewObserverHelper : public content::RenderViewObserver
{
public:
RenderViewObserverHelper(content::RenderView *);
private:
// RenderViewObserver implementation.
- virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidFinishLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
@@ -82,17 +121,25 @@ void UserResourceController::RenderViewObserverHelper::runScripts(UserScriptData
{
if (p == UserScriptData::AfterLoad && !m_pendingFrames.remove(frame))
return;
+
+ UserResourceController::instance()->runScripts(p, frame);
+}
+
+void UserResourceController::runScripts(UserScriptData::InjectionPoint p, blink::WebLocalFrame *frame)
+{
content::RenderView *renderView = content::RenderView::FromWebView(frame->view());
const bool isMainFrame = (frame == renderView->GetWebView()->mainFrame());
- QList<uint64_t> scriptsToRun = UserResourceController::instance()->m_viewUserScriptMap.value(globalScriptsIndex).toList();
- scriptsToRun.append(UserResourceController::instance()->m_viewUserScriptMap.value(renderView).toList());
+ QList<uint64_t> scriptsToRun = m_viewUserScriptMap.value(globalScriptsIndex).toList();
+ scriptsToRun.append(m_viewUserScriptMap.value(renderView).toList());
Q_FOREACH (uint64_t id, scriptsToRun) {
- const UserScriptData &script = UserResourceController::instance()->m_scripts.value(id);
+ const UserScriptData &script = m_scripts.value(id);
if (script.injectionPoint != p
|| (!script.injectForSubframes && !isMainFrame))
continue;
+ if (!scriptMatchesURL(script, frame->document().url()))
+ continue;
blink::WebScriptSource source(blink::WebString::fromUTF8(script.source), script.url);
if (script.worldId)
frame->executeScriptInIsolatedWorld(script.worldId, &source, /*numSources = */1, /*contentScriptExtentsionGroup = */ 0);
@@ -101,20 +148,23 @@ void UserResourceController::RenderViewObserverHelper::runScripts(UserScriptData
}
}
+void UserResourceController::RunScriptsAtDocumentStart(content::RenderFrame *render_frame)
+{
+ runScripts(UserScriptData::DocumentElementCreation, render_frame->GetWebFrame());
+}
-UserResourceController::RenderViewObserverHelper::RenderViewObserverHelper(content::RenderView *renderView)
- : content::RenderViewObserver(renderView)
+void UserResourceController::RunScriptsAtDocumentEnd(content::RenderFrame *render_frame)
{
+ runScripts(UserScriptData::DocumentLoadFinished, render_frame->GetWebFrame());
}
-void UserResourceController::RenderViewObserverHelper::DidCreateDocumentElement(blink::WebLocalFrame *frame)
+UserResourceController::RenderViewObserverHelper::RenderViewObserverHelper(content::RenderView *renderView)
+ : content::RenderViewObserver(renderView)
{
- runScripts(UserScriptData::DocumentElementCreation, frame);
}
void UserResourceController::RenderViewObserverHelper::DidFinishDocumentLoad(blink::WebLocalFrame *frame)
{
- runScripts(UserScriptData::DocumentLoadFinished, frame);
m_pendingFrames.insert(frame);
base::MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind(&UserResourceController::RenderViewObserverHelper::runScripts,
base::Unretained(this), UserScriptData::AfterLoad, frame),
diff --git a/src/core/renderer/user_resource_controller.h b/src/core/renderer/user_resource_controller.h
index bd3d0ba49..d0b5088d6 100644
--- a/src/core/renderer/user_resource_controller.h
+++ b/src/core/renderer/user_resource_controller.h
@@ -40,7 +40,7 @@
#ifndef USER_RESOURCE_CONTROLLER_H
#define USER_RESOURCE_CONTROLLER_H
-#include "content/public/renderer/render_process_observer.h"
+#include "content/public/renderer/render_thread_observer.h"
#include "common/user_script_data.h"
@@ -48,12 +48,16 @@
#include <QtCore/QHash>
#include <QtCore/QSet>
+namespace blink {
+class WebLocalFrame;
+}
+
namespace content {
+class RenderFrame;
class RenderView;
}
-
-class UserResourceController : public content::RenderProcessObserver {
+class UserResourceController : public content::RenderThreadObserver {
public:
static UserResourceController *instance();
@@ -64,22 +68,29 @@ public:
void removeScriptForView(const UserScriptData &, content::RenderView *);
void clearScriptsForView(content::RenderView *);
+ void RunScriptsAtDocumentStart(content::RenderFrame *render_frame);
+ void RunScriptsAtDocumentEnd(content::RenderFrame *render_frame);
+
private:
Q_DISABLE_COPY(UserResourceController)
class RenderViewObserverHelper;
// RenderProcessObserver implementation.
- virtual bool OnControlMessageReceived(const IPC::Message &message) Q_DECL_OVERRIDE;
+ bool OnControlMessageReceived(const IPC::Message &message) override;
void onAddScript(const UserScriptData &);
void onRemoveScript(const UserScriptData &);
void onClearScripts();
+ void runScripts(UserScriptData::InjectionPoint, blink::WebLocalFrame *);
+
typedef QSet<uint64_t> UserScriptSet;
typedef QHash<const content::RenderView *, UserScriptSet> ViewUserScriptMap;
ViewUserScriptMap m_viewUserScriptMap;
QHash<uint64_t, UserScriptData> m_scripts;
+
+ friend class RenderViewObserverHelper;
};
#endif // USER_RESOURCE_CONTROLLER_H
diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp
index 6bbbe28bd..161d6f493 100644
--- a/src/core/renderer/web_channel_ipc_transport.cpp
+++ b/src/core/renderer/web_channel_ipc_transport.cpp
@@ -44,6 +44,7 @@
#include "common/qt_messages.h"
+#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "gin/arguments.h"
#include "gin/handle.h"
@@ -153,11 +154,21 @@ content::RenderView *WebChannelTransport::GetRenderView(v8::Isolate *isolate)
WebChannelIPCTransport::WebChannelIPCTransport(content::RenderView *renderView)
: content::RenderViewObserver(renderView)
+ , content::RenderViewObserverTracker<WebChannelIPCTransport>(renderView)
, m_installed(false)
, m_installedWorldId(0)
{
}
+void WebChannelIPCTransport::RunScriptsAtDocumentStart(content::RenderFrame *render_frame)
+{
+ // JavaScript run before this point doesn't stick, and needs to be redone.
+ // ### FIXME: we should try no even installing before
+ if (m_installed && render_frame->IsMainFrame())
+ WebChannelTransport::Install(render_frame->GetWebFrame(), m_installedWorldId);
+}
+
+
void WebChannelIPCTransport::installWebChannel(uint worldId)
{
blink::WebView *webView = render_view()->GetWebView();
@@ -170,6 +181,7 @@ void WebChannelIPCTransport::installWebChannel(uint worldId)
void WebChannelIPCTransport::uninstallWebChannel(uint worldId)
{
+ Q_ASSERT(worldId = m_installedWorldId);
blink::WebView *webView = render_view()->GetWebView();
if (!webView)
return;
@@ -211,9 +223,12 @@ void WebChannelIPCTransport::dispatchWebChannelMessage(const std::vector<char> &
}
v8::Handle<v8::Object> messageObject(v8::Object::New(isolate));
- messageObject->ForceSet(v8::String::NewFromUtf8(isolate, "data")
- , v8::String::NewFromUtf8(isolate, json.constData(), v8::String::kNormalString, json.size())
- , v8::PropertyAttribute(v8::ReadOnly | v8::DontDelete));
+ v8::Maybe<bool> wasSet = messageObject->DefineOwnProperty(
+ context,
+ v8::String::NewFromUtf8(isolate, "data"),
+ v8::String::NewFromUtf8(isolate, json.constData(), v8::String::kNormalString, json.size()),
+ v8::PropertyAttribute(v8::ReadOnly | v8::DontDelete));
+ Q_ASSERT(!wasSet.IsNothing() && wasSet.FromJust());
v8::Handle<v8::Function> callback = v8::Handle<v8::Function>::Cast(onmessageCallbackValue);
const int argc = 1;
@@ -222,13 +237,6 @@ void WebChannelIPCTransport::dispatchWebChannelMessage(const std::vector<char> &
frame->callFunctionEvenIfScriptDisabled(callback, webChannelObjectValue->ToObject(), argc, argv);
}
-void WebChannelIPCTransport::DidCreateDocumentElement(blink::WebLocalFrame* frame)
-{
- blink::WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
- if (m_installed && frame == main_frame)
- WebChannelTransport::Install(frame, m_installedWorldId);
-}
-
bool WebChannelIPCTransport::OnMessageReceived(const IPC::Message &message)
{
bool handled = true;
diff --git a/src/core/renderer/web_channel_ipc_transport.h b/src/core/renderer/web_channel_ipc_transport.h
index fcee13bda..e949d1c99 100644
--- a/src/core/renderer/web_channel_ipc_transport.h
+++ b/src/core/renderer/web_channel_ipc_transport.h
@@ -42,24 +42,33 @@
#include "base/values.h"
#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_view_observer_tracker.h"
#include <QtCore/qcompilerdetection.h>
+namespace content {
+class RenderFrame;
+}
+
namespace v8 {
class Extension;
}
namespace QtWebEngineCore {
-class WebChannelIPCTransport : public content::RenderViewObserver {
+class WebChannelIPCTransport : public content::RenderViewObserver
+ , public content::RenderViewObserverTracker<WebChannelIPCTransport>
+{
public:
WebChannelIPCTransport(content::RenderView *);
+ void RunScriptsAtDocumentStart(content::RenderFrame *render_frame);
+
private:
void dispatchWebChannelMessage(const std::vector<char> &binaryJSON, uint worldId);
void installWebChannel(uint worldId);
void uninstallWebChannel(uint worldId);
- virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override;
virtual bool OnMessageReceived(const IPC::Message &message) Q_DECL_OVERRIDE;
+ virtual void OnDestruct() Q_DECL_OVERRIDE { }
bool m_installed;
uint m_installedWorldId;
diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
index 4427a67f2..4427a67f2 100644
--- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp
+++ b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
index 5d1107dfb..5d1107dfb 100644
--- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h
+++ b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
diff --git a/src/core/renderer/pepper/pepper_host_factory_qt.cpp b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
index 9b7236d8a..4a25e7756 100644
--- a/src/core/renderer/pepper/pepper_host_factory_qt.cpp
+++ b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
@@ -44,7 +44,9 @@
#include "pepper_host_factory_qt.h"
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
+#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "ppapi/host/message_filter_host.h"
#include "ppapi/host/ppapi_host.h"
@@ -53,7 +55,6 @@
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "pepper_flash_browser_host_qt.h"
-#include "pepper_flash_clipboard_message_filter_qt.h"
#include "pepper_isolated_file_system_message_filter.h"
using ppapi::host::MessageFilterHost;
@@ -68,7 +69,7 @@ PepperHostFactoryQt::PepperHostFactoryQt(content::BrowserPpapiHost* host)
PepperHostFactoryQt::~PepperHostFactoryQt() {}
-scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(ppapi::host::PpapiHost* host,
+std::unique_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
const IPC::Message& message)
@@ -77,16 +78,16 @@ scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(pp
if (!host_->IsValidInstance(instance))
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
// Flash interfaces.
if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)) {
switch (message.type()) {
case PpapiHostMsg_Flash_Create::ID:
- return scoped_ptr<ppapi::host::ResourceHost>(new PepperFlashBrowserHostQt(host_, instance, resource));
+ return base::WrapUnique(new PepperFlashBrowserHostQt(host_, instance, resource));
case PpapiHostMsg_FlashClipboard_Create::ID: {
- scoped_refptr<ResourceMessageFilter> clipboard_filter(new PepperFlashClipboardMessageFilter);
- return scoped_ptr<ppapi::host::ResourceHost>(new MessageFilterHost(
+ scoped_refptr<ResourceMessageFilter> clipboard_filter(new chrome::PepperFlashClipboardMessageFilter);
+ return base::WrapUnique(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, clipboard_filter));
}
}
@@ -101,11 +102,12 @@ scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(pp
if (message.type() == PpapiHostMsg_IsolatedFileSystem_Create::ID) {
PepperIsolatedFileSystemMessageFilter* isolated_fs_filter = PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
if (!isolated_fs_filter)
- return scoped_ptr<ppapi::host::ResourceHost>();
- return scoped_ptr<ppapi::host::ResourceHost>(new MessageFilterHost(host, instance, resource, isolated_fs_filter));
+ return nullptr;
+ return base::WrapUnique(
+ new MessageFilterHost(host_->GetPpapiHost(), instance, resource, isolated_fs_filter));
}
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
}
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_host_factory_qt.h b/src/core/renderer_host/pepper/pepper_host_factory_qt.h
index e73e097c0..0446cf9e3 100644
--- a/src/core/renderer/pepper/pepper_host_factory_qt.h
+++ b/src/core/renderer_host/pepper/pepper_host_factory_qt.h
@@ -57,7 +57,7 @@ public:
explicit PepperHostFactoryQt(content::BrowserPpapiHost* host);
~PepperHostFactoryQt() override;
- virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+ virtual std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
diff --git a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
index 7e8b2fdda..7e8b2fdda 100644
--- a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp
+++ b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
diff --git a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
index 750f7cea0..750f7cea0 100644
--- a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h
+++ b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
diff --git a/src/core/resource_dispatcher_host_delegate_qt.cpp b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
index af8b02e1b..16a4e7265 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
@@ -151,7 +151,8 @@ static void LaunchURL(const GURL& url, int render_process_id,
bool ResourceDispatcherHostDelegateQt::HandleExternalProtocol(const GURL& url, int child_id,
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
- bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture)
+ bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture,
+ content::ResourceContext* /*resource_context*/)
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
// We don't want to launch external applications unless it is based on a user action
diff --git a/src/core/resource_dispatcher_host_delegate_qt.h b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
index 90797dbbf..6690f9a0f 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
@@ -89,10 +89,10 @@ private:
class ResourceDispatcherHostDelegateQt : public content::ResourceDispatcherHostDelegate {
public:
- virtual bool HandleExternalProtocol(const GURL& url,int child_id,
- const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
- bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture)
- Q_DECL_OVERRIDE;
+ bool HandleExternalProtocol(const GURL& url, int child_id,
+ const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
+ bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture,
+ content::ResourceContext* resource_context) override;
virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(net::AuthChallengeInfo *authInfo, net::URLRequest *request) Q_DECL_OVERRIDE;
};
diff --git a/src/core/user_resource_controller_host.cpp b/src/core/renderer_host/user_resource_controller_host.cpp
index 9d2ba8eb8..9d2ba8eb8 100644
--- a/src/core/user_resource_controller_host.cpp
+++ b/src/core/renderer_host/user_resource_controller_host.cpp
diff --git a/src/core/user_resource_controller_host.h b/src/core/renderer_host/user_resource_controller_host.h
index 8e6e1e3bf..8e6e1e3bf 100644
--- a/src/core/user_resource_controller_host.h
+++ b/src/core/renderer_host/user_resource_controller_host.h
diff --git a/src/core/web_channel_ipc_transport_host.cpp b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
index aef16f0a0..aef16f0a0 100644
--- a/src/core/web_channel_ipc_transport_host.cpp
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
diff --git a/src/core/web_channel_ipc_transport_host.h b/src/core/renderer_host/web_channel_ipc_transport_host.h
index 9cc1f3104..75b40477e 100644
--- a/src/core/web_channel_ipc_transport_host.h
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.h
@@ -62,7 +62,7 @@ public:
virtual void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) Q_DECL_OVERRIDE;
// QWebChannelAbstractTransport
- virtual void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE;
+ void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE;
void setWorldId(uint worldId);
uint worldId() const { return m_worldId; }
diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp
index fa5c04524..5f5cead96 100644
--- a/src/core/resource_bundle_qt.cpp
+++ b/src/core/resource_bundle_qt.cpp
@@ -38,10 +38,20 @@
****************************************************************************/
#include "base/command_line.h"
+#include "base/metrics/histogram.h"
#include "content/public/common/content_switches.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/data_pack.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_switches.h"
+
#include "web_engine_library_info.h"
+#if defined(OS_LINUX)
+#include "base/posix/global_descriptors.h"
+#include "global_descriptors_qt.h"
+#endif
+
namespace ui {
void ResourceBundle::LoadCommonResources()
@@ -53,11 +63,69 @@ void ResourceBundle::LoadCommonResources()
AddOptionalDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_DEVTOOLS_PAK), SCALE_FACTOR_NONE);
}
-gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl)
+gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id)
{
LOG(WARNING) << "Unable to load image with id " << resource_id;
NOTREACHED(); // Want to assert in debug mode.
return GetEmptyImage();
}
+bool ResourceBundle::LocaleDataPakExists(const std::string& locale)
+{
+#if defined(OS_LINUX)
+ base::CommandLine *parsed_command_line = base::CommandLine::ForCurrentProcess();
+ std::string process_type = parsed_command_line->GetSwitchValueASCII(switches::kProcessType);
+ if (process_type == switches::kRendererProcess) {
+ // The Renderer Process is sandboxed thus only one locale is available in it.
+ // The particular one is passed by the --lang command line option.
+ if (!parsed_command_line->HasSwitch(switches::kLang) || parsed_command_line->GetSwitchValueASCII(switches::kLang) != locale)
+ return false;
+
+ auto global_descriptors = base::GlobalDescriptors::GetInstance();
+ return global_descriptors->MaybeGet(kWebEngineLocale) != -1;
+ }
+#endif
+
+ return !GetLocaleFilePath(locale, true).empty();
+}
+
+std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
+{
+ DCHECK(!locale_resources_data_.get()) << "locale.pak already loaded";
+
+ std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
+
+#if defined(OS_LINUX)
+ int locale_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(kWebEngineLocale);
+ if (locale_fd > -1) {
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ data_pack->LoadFromFile(base::File(locale_fd));
+ locale_resources_data_.reset(data_pack.release());
+ return app_locale;
+ }
+#endif
+
+ base::FilePath locale_file_path = GetOverriddenPakPath();
+ if (locale_file_path.empty())
+ locale_file_path = GetLocaleFilePath(app_locale, true);
+
+ if (locale_file_path.empty()) {
+ // It's possible that there is no locale.pak.
+ LOG(WARNING) << "locale_file_path.empty() for locale " << app_locale;
+ return std::string();
+ }
+
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ if (!data_pack->LoadFromPath(locale_file_path)) {
+ UMA_HISTOGRAM_ENUMERATION("ResourceBundle.LoadLocaleResourcesError",
+ logging::GetLastSystemErrorCode(), 16000);
+ LOG(ERROR) << "failed to load locale.pak";
+ NOTREACHED();
+ return std::string();
+ }
+
+ locale_resources_data_.reset(data_pack.release());
+ return app_locale;
+}
+
} // namespace ui
diff --git a/src/core/resource_context_qt.cpp b/src/core/resource_context_qt.cpp
index 5cb217605..1ab1ea223 100644
--- a/src/core/resource_context_qt.cpp
+++ b/src/core/resource_context_qt.cpp
@@ -39,6 +39,7 @@
#include "resource_context_qt.h"
+#include "content/public/browser/storage_partition.h"
#include "net/url_request/url_request_context_getter.h"
#include "browser_context_qt.h"
@@ -53,6 +54,8 @@ net::HostResolver *ResourceContextQt::GetHostResolver()
net::URLRequestContext* ResourceContextQt::GetRequestContext()
{
Q_ASSERT(context);
+ // FIXME: This is the only remaining use of GetRequestContext(),
+ // but we are on the wrong thread for calling BrowserContext::GetDefaultStoragePartition
return context->GetRequestContext()->GetURLRequestContext();
}
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 618b4d355..8b7d520a9 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -20,6 +20,7 @@
'dependencies': [
'<(chromium_src_dir)/content/app/strings/content_strings.gyp:content_strings',
'<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
+ '<(chromium_src_dir)/components/components_resources.gyp:components_resources',
'<(chromium_src_dir)/components/components_strings.gyp:components_strings',
'<(chromium_src_dir)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
'<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_resources',
@@ -30,6 +31,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
@@ -45,6 +47,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
@@ -60,6 +63,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_200_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak',
diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp
index 48c91bfcf..97a304730 100644
--- a/src/core/surface_factory_qt.cpp
+++ b/src/core/surface_factory_qt.cpp
@@ -85,7 +85,7 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library,
if (!gles2Library)
return false;
- gfx::GLGetProcAddressProc get_proc_address = reinterpret_cast<gfx::GLGetProcAddressProc>(base::GetFunctionPointerFromNativeLibrary(eglLibrary, "eglGetProcAddress"));
+ gl::GLGetProcAddressProc get_proc_address = reinterpret_cast<gl::GLGetProcAddressProc>(base::GetFunctionPointerFromNativeLibrary(eglLibrary, "eglGetProcAddress"));
if (!get_proc_address) {
LOG(ERROR) << "eglGetProcAddress not found.";
base::UnloadNativeLibrary(eglLibrary);
@@ -93,9 +93,9 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library,
return false;
}
- gfx::SetGLGetProcAddressProc(get_proc_address);
- gfx::AddGLNativeLibrary(eglLibrary);
- gfx::AddGLNativeLibrary(gles2Library);
+ gl::SetGLGetProcAddressProc(get_proc_address);
+ gl::AddGLNativeLibrary(eglLibrary);
+ gl::AddGLNativeLibrary(gles2Library);
return true;
}
diff --git a/src/core/type_conversion.cpp b/src/core/type_conversion.cpp
index ef220b86c..a7b5ee831 100644
--- a/src/core/type_conversion.cpp
+++ b/src/core/type_conversion.cpp
@@ -50,6 +50,8 @@ QImage toQImage(const SkBitmap &bitmap)
QImage image;
switch (bitmap.colorType()) {
case kUnknown_SkColorType:
+ case kRGBA_F16_SkColorType:
+ qWarning("Unknown or unsupported skia image format");
break;
case kAlpha_8_SkColorType:
image = toQImage(bitmap, QImage::Format_Alpha8);
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index e96a544e5..ed02a9db9 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -60,7 +60,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPixelRef.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
+#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "url/gurl.h"
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index bf32c75a4..bf4661102 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -40,6 +40,7 @@
#include "url_request_context_getter_qt.h"
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/threading/worker_pool.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -48,6 +49,10 @@
#include "content/public/common/content_switches.h"
#include "net/base/cache_type.h"
#include "net/cert/cert_verifier.h"
+#include "net/cert/ct_known_logs.h"
+#include "net/cert/ct_log_verifier.h"
+#include "net/cert/ct_policy_enforcer.h"
+#include "net/cert/multi_log_ct_verifier.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mapped_host_resolver.h"
@@ -86,8 +91,6 @@
namespace QtWebEngineCore {
-static const char kQrcSchemeQt[] = "qrc";
-
using content::BrowserThread;
URLRequestContextGetterQt::URLRequestContextGetterQt(QSharedPointer<BrowserContextAdapter> browserContext, content::ProtocolHandlerMap *protocolHandlers, content::URLRequestInterceptorScopedVector request_interceptors)
@@ -216,6 +219,7 @@ void URLRequestContextGetterQt::generateStorage()
cancelAllUrlRequests();
// we need to get rid of dangling pointer due to coming storage deletion
m_urlRequestContext->set_http_transaction_factory(0);
+ m_httpNetworkSession.reset();
}
m_storage.reset(new net::URLRequestContextStorage(m_urlRequestContext.get()));
@@ -224,8 +228,12 @@ void URLRequestContextGetterQt::generateStorage()
Q_ASSERT(proxyConfigService);
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
+ std::unique_ptr<net::MultiLogCTVerifier> ct_verifier(new net::MultiLogCTVerifier());
+ ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
+ m_storage->set_cert_transparency_verifier(std::move(ct_verifier));
+ m_storage->set_ct_policy_enforcer(base::WrapUnique(new net::CTPolicyEnforcer));
- scoped_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
+ std::unique_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
// The System Proxy Resolver has issues on Windows with unconfigured network cards,
// which is why we want to use the v8 one
@@ -233,7 +241,7 @@ void URLRequestContextGetterQt::generateStorage()
m_dhcpProxyScriptFetcherFactory.reset(new net::DhcpProxyScriptFetcherFactory);
m_storage->set_proxy_service(net::CreateProxyServiceUsingV8ProxyResolver(
- scoped_ptr<net::ProxyConfigService>(proxyConfigService),
+ std::unique_ptr<net::ProxyConfigService>(proxyConfigService),
new net::ProxyScriptFetcherImpl(m_urlRequestContext.get()),
m_dhcpProxyScriptFetcherFactory->Create(m_urlRequestContext.get()),
host_resolver.get(),
@@ -241,10 +249,10 @@ void URLRequestContextGetterQt::generateStorage()
m_networkDelegate.get()));
m_storage->set_ssl_config_service(new net::SSLConfigServiceDefaults);
- m_storage->set_transport_security_state(scoped_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
+ m_storage->set_transport_security_state(std::unique_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
m_storage->set_http_auth_handler_factory(net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
- m_storage->set_http_server_properties(scoped_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
+ m_storage->set_http_server_properties(std::unique_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
// Give |m_storage| ownership at the end in case it's |mapped_host_resolver|.
m_storage->set_host_resolver(std::move(host_resolver));
@@ -283,7 +291,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
m_storage->set_channel_id_service(
- scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
+ base::WrapUnique(new net::ChannelIDService(
new net::DefaultChannelIDStore(channel_id_db.get()),
base::WorkerPool::GetTaskRunner(true))));
@@ -291,7 +299,7 @@ void URLRequestContextGetterQt::generateCookieStore()
m_storage->set_cookie_store(0);
m_cookieDelegate->setCookieMonster(0);
- net::CookieStore* cookieStore = 0;
+ std::unique_ptr<net::CookieStore> cookieStore;
switch (m_persistentCookiesPolicy) {
case BrowserContextAdapter::NoPersistentCookies:
cookieStore =
@@ -321,10 +329,13 @@ void URLRequestContextGetterQt::generateCookieStore()
);
break;
}
- m_storage->set_cookie_store(cookieStore);
- net::CookieMonster * const cookieMonster = cookieStore->GetCookieMonster();
- cookieMonster->SetCookieableSchemes(kCookieableSchemes, arraysize(kCookieableSchemes));
+ net::CookieMonster * const cookieMonster = static_cast<net::CookieMonster*>(cookieStore.get());
+ cookieStore->SetChannelIDServiceID(m_urlRequestContext->channel_id_service()->GetUniqueID());
+ m_storage->set_cookie_store(std::move(cookieStore));
+
+ const std::vector<std::string> cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes));
+ cookieMonster->SetCookieableSchemes(cookieableSchemes);
m_cookieDelegate->setCookieMonster(cookieMonster);
}
@@ -351,7 +362,7 @@ void URLRequestContextGetterQt::generateUserAgent()
QMutexLocker lock(&m_mutex);
m_updateUserAgent = true;
- m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(
+ m_storage->set_http_user_agent_settings(std::unique_ptr<net::HttpUserAgentSettings>(
new net::StaticHttpUserAgentSettings(m_httpAcceptLanguage.toStdString(), m_httpUserAgent.toStdString())));
}
@@ -406,14 +417,16 @@ static bool doNetworkSessionParamsMatch(const net::HttpNetworkSession::Params &f
return false;
if (first.http_auth_handler_factory != second.http_auth_handler_factory)
return false;
- if (first.network_delegate != second.network_delegate)
- return false;
- if (first.http_server_properties.get() != second.http_server_properties.get())
+ if (first.http_server_properties != second.http_server_properties)
return false;
if (first.ignore_certificate_errors != second.ignore_certificate_errors)
return false;
if (first.host_resolver != second.host_resolver)
return false;
+ if (first.cert_transparency_verifier != second.cert_transparency_verifier)
+ return false;
+ if (first.ct_policy_enforcer != second.ct_policy_enforcer)
+ return false;
return true;
}
@@ -430,10 +443,11 @@ net::HttpNetworkSession::Params URLRequestContextGetterQt::generateNetworkSessio
network_session_params.proxy_service = m_urlRequestContext->proxy_service();
network_session_params.ssl_config_service = m_urlRequestContext->ssl_config_service();
network_session_params.http_auth_handler_factory = m_urlRequestContext->http_auth_handler_factory();
- network_session_params.network_delegate = m_networkDelegate.get();
network_session_params.http_server_properties = m_urlRequestContext->http_server_properties();
network_session_params.ignore_certificate_errors = m_ignoreCertificateErrors;
network_session_params.host_resolver = m_urlRequestContext->host_resolver();
+ network_session_params.cert_transparency_verifier = m_urlRequestContext->cert_transparency_verifier();
+ network_session_params.ct_policy_enforcer = m_urlRequestContext->ct_policy_enforcer();
return network_session_params;
}
@@ -482,9 +496,9 @@ void URLRequestContextGetterQt::generateHttpCache()
m_httpNetworkSession.reset(new net::HttpNetworkSession(network_session_params));
}
- cache = new net::HttpCache(m_httpNetworkSession.get(), scoped_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
+ cache = new net::HttpCache(m_httpNetworkSession.get(), std::unique_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
- m_storage->set_http_transaction_factory(scoped_ptr<net::HttpCache>(cache));
+ m_storage->set_http_transaction_factory(std::unique_ptr<net::HttpCache>(cache));
}
void URLRequestContextGetterQt::clearHttpCache()
@@ -513,36 +527,39 @@ void URLRequestContextGetterQt::generateJobFactory()
QMutexLocker lock(&m_mutex);
m_updateJobFactory = false;
- scoped_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
{
- // Chromium has a few protocol handlers ready for us, only pick blob: and throw away the rest.
+ // Chromium has transferred a few protocol handlers to us, only pick blob: and chrome: and ignore the rest.
content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
Q_ASSERT(it != m_protocolHandlers.end());
- jobFactory->SetProtocolHandler(it->first, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ it = m_protocolHandlers.find(content::kChromeUIScheme);
+ Q_ASSERT(it != m_protocolHandlers.end());
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
m_protocolHandlers.clear();
}
- jobFactory->SetProtocolHandler(url::kDataScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
- jobFactory->SetProtocolHandler(url::kFileScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
+ jobFactory->SetProtocolHandler(url::kDataScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
+ jobFactory->SetProtocolHandler(url::kFileScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
content::BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
- jobFactory->SetProtocolHandler(kQrcSchemeQt, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
+ jobFactory->SetProtocolHandler(kQrcSchemeQt, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
jobFactory->SetProtocolHandler(url::kFtpScheme,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
+ std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- jobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ jobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
m_baseJobFactory = jobFactory.get();
// Set up interceptors in the reverse order.
- scoped_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
+ std::unique_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i)
- topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), make_scoped_ptr(*i)));
+ topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), std::unique_ptr<net::URLRequestInterceptor>(*i)));
m_requestInterceptors.weak_clear();
@@ -570,7 +587,7 @@ void URLRequestContextGetterQt::regenerateJobFactory()
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
}
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index dd51fd72c..8cfa8d759 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -44,8 +44,8 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/url_constants.h"
#include "net/http/http_network_session.h"
@@ -116,15 +116,15 @@ private:
content::ProtocolHandlerMap m_protocolHandlers;
QAtomicPointer<net::ProxyConfigService> m_proxyConfigService;
- scoped_ptr<net::URLRequestContext> m_urlRequestContext;
- scoped_ptr<NetworkDelegateQt> m_networkDelegate;
- scoped_ptr<net::URLRequestContextStorage> m_storage;
- scoped_ptr<net::URLRequestJobFactory> m_jobFactory;
+ std::unique_ptr<net::URLRequestContext> m_urlRequestContext;
+ std::unique_ptr<NetworkDelegateQt> m_networkDelegate;
+ std::unique_ptr<net::URLRequestContextStorage> m_storage;
+ std::unique_ptr<net::URLRequestJobFactory> m_jobFactory;
net::URLRequestJobFactoryImpl *m_baseJobFactory;
- scoped_ptr<net::DhcpProxyScriptFetcherFactory> m_dhcpProxyScriptFetcherFactory;
+ std::unique_ptr<net::DhcpProxyScriptFetcherFactory> m_dhcpProxyScriptFetcherFactory;
scoped_refptr<CookieMonsterDelegateQt> m_cookieDelegate;
content::URLRequestInterceptorScopedVector m_requestInterceptors;
- scoped_ptr<net::HttpNetworkSession> m_httpNetworkSession;
+ std::unique_ptr<net::HttpNetworkSession> m_httpNetworkSession;
QList<QByteArray> m_installedCustomSchemes;
QWebEngineUrlRequestInterceptor* m_requestInterceptor;
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp
index 839eff366..b33dd6a7d 100644
--- a/src/core/user_script.cpp
+++ b/src/core/user_script.cpp
@@ -38,11 +38,39 @@
****************************************************************************/
#include "common/user_script_data.h"
+#include "extensions/common/url_pattern.h"
#include "user_script.h"
#include "type_conversion.h"
+namespace {
+
+// Helper function to parse Greasemonkey headers
+bool GetDeclarationValue(const base::StringPiece& line,
+ const base::StringPiece& prefix,
+ std::string* value) {
+ base::StringPiece::size_type index = line.find(prefix);
+ if (index == base::StringPiece::npos)
+ return false;
+
+ std::string temp(line.data() + index + prefix.length(),
+ line.length() - index - prefix.length());
+
+ if (temp.empty() || !base::IsUnicodeWhitespace(temp[0]))
+ return false;
+
+ base::TrimWhitespaceASCII(temp, base::TRIM_ALL, value);
+ return true;
+}
+
+} // namespace
+
namespace QtWebEngineCore {
+int UserScript::validUserScriptSchemes()
+{
+ return URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS | URLPattern::SCHEME_FILE;
+}
+
ASSERT_ENUMS_MATCH(UserScript::AfterLoad, UserScriptData::AfterLoad)
ASSERT_ENUMS_MATCH(UserScript::DocumentLoadFinished, UserScriptData::DocumentLoadFinished)
ASSERT_ENUMS_MATCH(UserScript::DocumentElementCreation, UserScriptData::DocumentElementCreation)
@@ -100,6 +128,7 @@ void UserScript::setSourceCode(const QString &source)
{
initData();
scriptData->source = source.toStdString();
+ parseMetadataHeader();
}
UserScript::InjectionPoint UserScript::injectionPoint() const
@@ -169,4 +198,80 @@ UserScriptData &UserScript::data() const
return *(scriptData.data());
}
+void UserScript::parseMetadataHeader()
+{
+ // Logic taken from Chromium (extensions/browser/user_script_loader.cc)
+ // http://wiki.greasespot.net/Metadata_block
+ const std::string &script_text = scriptData->source;
+ base::StringPiece line;
+ size_t line_start = 0;
+ size_t line_end = line_start;
+ bool in_metadata = false;
+
+ static const base::StringPiece kUserScriptBegin("// ==UserScript==");
+ static const base::StringPiece kUserScriptEnd("// ==/UserScript==");
+ static const base::StringPiece kNameDeclaration("// @name");
+ static const base::StringPiece kIncludeDeclaration("// @include");
+ static const base::StringPiece kExcludeDeclaration("// @exclude");
+ static const base::StringPiece kMatchDeclaration("// @match");
+ static const base::StringPiece kRunAtDeclaration("// @run-at");
+ static const base::StringPiece kRunAtDocumentStartValue("document-start");
+ static const base::StringPiece kRunAtDocumentEndValue("document-end");
+ static const base::StringPiece kRunAtDocumentIdleValue("document-idle");
+ // FIXME: Scripts don't run in subframes by default. If we would like to
+ // support @noframes rule, we have to change the current default behavior.
+ // static const base::StringPiece kNoFramesDeclaration("// @noframes");
+
+ static URLPattern urlPatternParser(validUserScriptSchemes());
+
+ while (line_start < script_text.length()) {
+ line_end = script_text.find('\n', line_start);
+
+ // Handle the case where there is no trailing newline in the file.
+ if (line_end == std::string::npos)
+ line_end = script_text.length() - 1;
+
+ line.set(script_text.data() + line_start, line_end - line_start);
+
+ if (!in_metadata) {
+ if (line.starts_with(kUserScriptBegin))
+ in_metadata = true;
+ } else {
+ if (line.starts_with(kUserScriptEnd))
+ break;
+
+ std::string value;
+ if (GetDeclarationValue(line, kNameDeclaration, &value)) {
+ setName(toQt(value));
+ } else if (GetDeclarationValue(line, kIncludeDeclaration, &value)) {
+ // We escape some characters that MatchPattern() considers special.
+ base::ReplaceSubstringsAfterOffset(&value, 0, "\\", "\\\\");
+ base::ReplaceSubstringsAfterOffset(&value, 0, "?", "\\?");
+ scriptData->globs.push_back(value);
+ } else if (GetDeclarationValue(line, kExcludeDeclaration, &value)) {
+ base::ReplaceSubstringsAfterOffset(&value, 0, "\\", "\\\\");
+ base::ReplaceSubstringsAfterOffset(&value, 0, "?", "\\?");
+ scriptData->excludeGlobs.push_back(value);
+ } else if (GetDeclarationValue(line, kMatchDeclaration, &value)) {
+ if (URLPattern::PARSE_SUCCESS == urlPatternParser.Parse(value))
+ scriptData->urlPatterns.push_back(value);
+ } else if (GetDeclarationValue(line, kRunAtDeclaration, &value)) {
+ if (value == kRunAtDocumentStartValue)
+ scriptData->injectionPoint = DocumentElementCreation;
+ else if (value == kRunAtDocumentEndValue)
+ scriptData->injectionPoint = DocumentLoadFinished;
+ else if (value == kRunAtDocumentIdleValue)
+ scriptData->injectionPoint = AfterLoad;
+ }
+ }
+
+ line_start = line_end + 1;
+ }
+
+ // If no patterns were specified, default to @include *. This is what
+ // Greasemonkey does.
+ if (scriptData->globs.empty() && scriptData->urlPatterns.empty())
+ scriptData->globs.push_back("*");
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/user_script.h b/src/core/user_script.h
index 9d7d66a58..e44efd3e9 100644
--- a/src/core/user_script.h
+++ b/src/core/user_script.h
@@ -85,9 +85,12 @@ public:
bool operator==(const UserScript &) const;
+ static int validUserScriptSchemes();
+
private:
void initData();
UserScriptData &data() const;
+ void parseMetadataHeader();
friend class UserResourceControllerHost;
QScopedPointer<UserScriptData> scriptData;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index fc54c98ed..fadbd6d2e 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -46,14 +46,16 @@
#include "browser_accessibility_qt.h"
#include "browser_context_adapter.h"
+#include "browser_context_adapter_client.h"
#include "browser_context_qt.h"
#include "download_manager_delegate_qt.h"
#include "media_capture_devices_dispatcher.h"
+#include "pdfium_printing_wrapper_qt.h"
#include "print_view_manager_qt.h"
#include "qwebenginecallback_p.h"
+#include "renderer_host/web_channel_ipc_transport_host.h"
#include "render_view_observer_host_qt.h"
#include "type_conversion.h"
-#include "web_channel_ipc_transport_host.h"
#include "web_contents_adapter_client.h"
#include "web_contents_view_qt.h"
#include "web_engine_context.h"
@@ -90,6 +92,9 @@
#include <QtGui/qaccessible.h>
#include <QtGui/qdrag.h>
#include <QtGui/qpixmap.h>
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+#include <QtPrintSupport/qprinter.h>
+#endif // QT_NO_PRINTER
#include <QtWebChannel/QWebChannel>
namespace QtWebEngineCore {
@@ -188,6 +193,17 @@ static void callbackOnPrintingFinished(WebContentsAdapterClient *adapterClient,
}
}
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+static void callbackOnPrintingOnPrinterFinished(WebContentsAdapterClient *adapterClient, int requestId, QPrinter *printer, const std::vector<char> &result)
+{
+ if (requestId) {
+ PdfiumPrintingWrapperQt printWrapper(result.data(), result.size());
+ bool printerResult = printWrapper.printOnPrinter(*printer);
+ adapterClient->didPrintPageOnPrinter(requestId, printerResult);
+ }
+}
+#endif // QT_NO_PRINTER
+
static content::WebContents *createBlankWebContents(WebContentsAdapterClient *adapterClient, content::BrowserContext *browserContext)
{
content::WebContents::CreateParams create_params(browserContext, NULL);
@@ -231,7 +247,7 @@ static void serializeNavigationHistory(const content::NavigationController &cont
}
}
-static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<scoped_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
+static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<std::unique_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
{
int version;
input >> version;
@@ -280,7 +296,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex,
return;
}
- scoped_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
+ std::unique_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
toGurl(virtualUrl),
content::Referrer(toGurl(referrerUrl), static_cast<blink::WebReferrerPolicy>(referrerPolicy)),
// Use a transition type of reload so that we don't incorrectly
@@ -335,7 +351,6 @@ WebContentsAdapterPrivate::WebContentsAdapterPrivate()
, adapterClient(0)
, nextRequestId(CallbackDirectory::ReservedCallbackIdsEnd)
, lastFindRequestId(0)
- , currentDropData(nullptr)
, currentDropAction(Qt::IgnoreAction)
, inDragUpdateLoop(false)
, updateDragCursorMessagePollingTimer(new QTimer)
@@ -351,7 +366,7 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
{
int currentIndex;
- std::vector<scoped_ptr<content::NavigationEntry>> entries;
+ std::vector<std::unique_ptr<content::NavigationEntry>> entries;
deserializeNavigationHistory(input, &currentIndex, &entries, adapterClient->browserContextAdapter()->browserContext());
if (currentIndex == -1)
@@ -469,21 +484,21 @@ void WebContentsAdapter::stop()
controller.RemoveEntryAtIndex(index);
d->webContents->Stop();
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::reload()
{
Q_D(WebContentsAdapter);
d->webContents->GetController().Reload(/*checkRepost = */false);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::reloadAndBypassCache()
{
Q_D(WebContentsAdapter);
- d->webContents->GetController().ReloadIgnoringCache(/*checkRepost = */false);
- d->webContents->Focus();
+ d->webContents->GetController().ReloadBypassingCache(/*checkRepost = */false);
+ focusIfNecessary();
}
void WebContentsAdapter::load(const QUrl &url)
@@ -502,11 +517,23 @@ void WebContentsAdapter::load(const QUrl &url)
Q_UNUSED(guard);
Q_D(WebContentsAdapter);
- content::NavigationController::LoadURLParams params(toGurl(url));
+ GURL gurl = toGurl(url);
+
+ // Add URL scheme if missing from view-source URL.
+ if (url.scheme() == content::kViewSourceScheme) {
+ QUrl pageUrl = QUrl(url.toString().remove(0, strlen(content::kViewSourceScheme) + 1));
+ if (pageUrl.scheme().isEmpty()) {
+ QUrl extendedUrl = QUrl::fromUserInput(pageUrl.toString());
+ extendedUrl = QUrl(QString("%1:%2").arg(content::kViewSourceScheme, extendedUrl.toString()));
+ gurl = toGurl(extendedUrl);
+ }
+ }
+
+ content::NavigationController::LoadURLParams params(gurl);
params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
d->webContents->GetController().LoadURLWithParams(params);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
@@ -519,7 +546,7 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT
urlString.append(encodedData.constData(), encodedData.length());
GURL dataUrlToLoad(urlString);
- if (dataUrlToLoad.spec().size() > content::kMaxURLChars) {
+ if (dataUrlToLoad.spec().size() > url::kMaxURLChars) {
d->adapterClient->loadFinished(false, baseUrl, false, net::ERR_ABORTED);
return;
}
@@ -531,13 +558,14 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT
params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_API);
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
d->webContents->GetController().LoadURLWithParams(params);
- d->webContents->Focus();
+ focusIfNecessary();
d->webContents->Unselect();
}
-void WebContentsAdapter::save()
+void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
{
Q_D(WebContentsAdapter);
+ d->webContentsDelegate->setSavePageInfo(SavePageInfo(filePath, savePageFormat));
d->webContents->OnSavePage();
}
@@ -631,7 +659,7 @@ void WebContentsAdapter::selectAll()
void WebContentsAdapter::requestClose()
{
Q_D(WebContentsAdapter);
- d->webContents->DispatchBeforeUnload(false);
+ d->webContents->DispatchBeforeUnload();
}
void WebContentsAdapter::unselect()
@@ -644,14 +672,14 @@ void WebContentsAdapter::navigateToIndex(int offset)
{
Q_D(WebContentsAdapter);
d->webContents->GetController().GoToIndex(offset);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::navigateToOffset(int offset)
{
Q_D(WebContentsAdapter);
d->webContents->GetController().GoToOffset(offset);
- d->webContents->Focus();
+ focusIfNecessary();
}
int WebContentsAdapter::navigationEntryCount()
@@ -849,13 +877,19 @@ void WebContentsAdapter::updateWebPreferences(const content::WebPreferences & we
void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileName)
{
+ Q_D(WebContentsAdapter);
content::BrowserContext *bctx = webContents()->GetBrowserContext();
content::DownloadManager *dlm = content::BrowserContext::GetDownloadManager(bctx);
+ DownloadManagerDelegateQt *dlmd = d->browserContextAdapter->downloadManagerDelegate();
+
if (!dlm)
return;
- scoped_ptr<content::DownloadUrlParameters> params(
- content::DownloadUrlParameters::FromWebContents(webContents(), toGurl(url)));
+ dlmd->setDownloadType(BrowserContextAdapterClient::UserRequested);
+ dlm->SetDelegate(dlmd);
+
+ std::unique_ptr<content::DownloadUrlParameters> params(
+ content::DownloadUrlParameters::CreateForWebContentsMainFrame(webContents(), toGurl(url)));
params->set_suggested_name(toString16(suggestedFileName));
dlm->DownloadUrl(std::move(params));
}
@@ -881,7 +915,7 @@ bool WebContentsAdapter::recentlyAudible()
void WebContentsAdapter::copyImageAt(const QPoint &location)
{
Q_D(WebContentsAdapter);
- d->webContents->GetRenderViewHost()->CopyImageAt(location.x(), location.y());
+ d->webContents->GetRenderViewHost()->GetMainFrame()->CopyImageAt(location.x(), location.y());
}
ASSERT_ENUMS_MATCH(WebContentsAdapter::MediaPlayerNoAction, blink::WebMediaPlayerAction::Unknown)
@@ -916,13 +950,13 @@ bool WebContentsAdapter::hasInspector() const
void WebContentsAdapter::exitFullScreen()
{
Q_D(WebContentsAdapter);
- d->webContents->ExitFullscreen();
+ d->webContents->ExitFullscreen(false);
}
void WebContentsAdapter::changedFullScreen()
{
Q_D(WebContentsAdapter);
- d->webContents->NotifyFullscreenChanged();
+ d->webContents->NotifyFullscreenChanged(false);
}
void WebContentsAdapter::wasShown()
@@ -940,7 +974,7 @@ void WebContentsAdapter::wasHidden()
void WebContentsAdapter::printToPDF(const QPageLayout &pageLayout, const QString &filePath)
{
#if defined(ENABLE_BASIC_PRINTING)
- PrintViewManagerQt::FromWebContents(webContents())->PrintToPDF(pageLayout, filePath);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDF(pageLayout, true, filePath);
#endif // if defined(ENABLE_BASIC_PRINTING)
}
@@ -948,13 +982,33 @@ quint64 WebContentsAdapter::printToPDFCallbackResult(const QPageLayout &pageLayo
{
#if defined(ENABLE_BASIC_PRINTING)
Q_D(WebContentsAdapter);
- PrintViewManagerQt::PrintToPDFCallback callback = base::Bind(&callbackOnPrintingFinished, d->adapterClient, d->nextRequestId);
- PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(pageLayout, callback);
+ PrintViewManagerQt::PrintToPDFCallback callback = base::Bind(&callbackOnPrintingFinished
+ , d->adapterClient
+ , d->nextRequestId);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(pageLayout, true
+ , callback);
+ return d->nextRequestId++;
+#else
+ return 0;
+#endif // if defined(ENABLE_BASIC_PRINTING)
+}
+
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+quint64 WebContentsAdapter::printOnPrinterCallbackResult(QPrinter *printer)
+{
+#if defined(ENABLE_BASIC_PRINTING)
+ Q_D(WebContentsAdapter);
+ PrintViewManagerQt::PrintToPDFCallback callback
+ = base::Bind(&callbackOnPrintingOnPrinterFinished, d->adapterClient
+ , d->nextRequestId, printer);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(
+ printer->pageLayout(), printer->colorMode() == QPrinter::Color, callback);
return d->nextRequestId++;
#else
return 0;
#endif // if defined(ENABLE_BASIC_PRINTING)
}
+#endif // QT_NO_PRINTER
QPointF WebContentsAdapter::lastScrollOffset() const
{
@@ -1079,15 +1133,14 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD
// Clear certain fields of the drop data to not run into DCHECKs
// of DropDataToWebDragData in render_view_impl.cc.
- content::DropData fixedDropData = dropData;
- fixedDropData.download_metadata.clear();
- fixedDropData.file_contents.clear();
- fixedDropData.file_description_filename.clear();
+ d->currentDropData.reset(new content::DropData(dropData));
+ d->currentDropData->download_metadata.clear();
+ d->currentDropData->file_contents.clear();
+ d->currentDropData->file_description_filename.clear();
d->currentDropAction = Qt::IgnoreAction;
- d->currentDropData = &fixedDropData;
QDrag *drag = new QDrag(dragSource); // will be deleted by Qt's DnD implementation
- drag->setMimeData(mimeDataFromDropData(fixedDropData));
+ drag->setMimeData(mimeDataFromDropData(*d->currentDropData));
if (!pixmap.isNull()) {
drag->setPixmap(pixmap);
drag->setHotSpot(offset);
@@ -1100,7 +1153,7 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
rvh->DragSourceSystemDragEnded();
- d->currentDropData = nullptr;
+ d->currentDropData.reset();
}
static blink::WebDragOperationsMask toWeb(const Qt::DropActions action)
@@ -1137,17 +1190,15 @@ void WebContentsAdapter::enterDrag(QDragEnterEvent *e, const QPoint &screenPos)
{
Q_D(WebContentsAdapter);
- scoped_ptr<content::DropData> ownedDropData;
- const content::DropData *rvhDropData = d->currentDropData;
- if (!rvhDropData) {
+ if (!d->currentDropData) {
// The drag originated outside the WebEngineView.
- ownedDropData.reset(new content::DropData);
- fillDropDataFromMimeData(ownedDropData.get(), e->mimeData());
- rvhDropData = ownedDropData.get();
+ d->currentDropData.reset(new content::DropData);
+ fillDropDataFromMimeData(d->currentDropData.get(), e->mimeData());
}
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
- rvh->DragTargetDragEnter(*rvhDropData, toGfx(e->pos()), toGfx(screenPos),
+ rvh->FilterDropData(d->currentDropData.get());
+ rvh->DragTargetDragEnter(*d->currentDropData, toGfx(e->pos()), toGfx(screenPos),
toWeb(e->possibleActions()),
flagsFromModifiers(e->keyboardModifiers()));
}
@@ -1203,7 +1254,9 @@ void WebContentsAdapter::endDragging(const QPoint &clientPos, const QPoint &scre
Q_D(WebContentsAdapter);
finishDragUpdate();
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
- rvh->DragTargetDrop(toGfx(clientPos), toGfx(screenPos), 0);
+ rvh->FilterDropData(d->currentDropData.get());
+ rvh->DragTargetDrop(*d->currentDropData, toGfx(clientPos), toGfx(screenPos), 0);
+ d->currentDropData.reset();
}
void WebContentsAdapter::leaveDrag()
@@ -1212,6 +1265,7 @@ void WebContentsAdapter::leaveDrag()
finishDragUpdate();
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
rvh->DragTargetDragLeave();
+ d->currentDropData.reset();
}
void WebContentsAdapter::initUpdateDragCursorMessagePollingTimer()
@@ -1242,6 +1296,15 @@ void WebContentsAdapter::replaceMisspelling(const QString &word)
#endif
}
+void WebContentsAdapter::focusIfNecessary()
+{
+ Q_D(WebContentsAdapter);
+ const WebEngineSettings *settings = d->adapterClient->webEngineSettings();
+ bool focusOnNavigation = settings->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+ if (focusOnNavigation)
+ d->webContents->Focus();
+}
+
WebContentsAdapterClient::RenderProcessTerminationStatus
WebContentsAdapterClient::renderProcessExitStatus(int terminationStatus) {
auto status = WebContentsAdapterClient::RenderProcessTerminationStatus(-1);
@@ -1280,4 +1343,16 @@ FaviconManager *WebContentsAdapter::faviconManager()
return d->webContentsDelegate->faviconManager();
}
+void WebContentsAdapter::viewSource()
+{
+ Q_D(WebContentsAdapter);
+ d->webContents->ViewSource();
+}
+
+bool WebContentsAdapter::canViewSource()
+{
+ Q_D(WebContentsAdapter);
+ return d->webContents->GetController().CanViewSource();
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index ec8cd7914..7a109770e 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -58,6 +58,9 @@ class QAccessibleInterface;
class QDragEnterEvent;
class QDragMoveEvent;
class QPageLayout;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+class QPrinter;
+#endif // QT_NO_PRINTER
class QString;
class QWebChannel;
QT_END_NAMESPACE
@@ -85,7 +88,7 @@ public:
void reloadAndBypassCache();
void load(const QUrl&);
void setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl);
- void save();
+ void save(const QString &filePath = QString(), int savePageFormat = -1);
QUrl activeUrl() const;
QUrl requestedUrl() const;
QString pageTitle() const;
@@ -174,10 +177,19 @@ public:
void printToPDF(const QPageLayout&, const QString&);
quint64 printToPDFCallbackResult(const QPageLayout &);
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ quint64 printOnPrinterCallbackResult(QPrinter *printer);
+#endif
+
// meant to be used within WebEngineCore only
content::WebContents *webContents() const;
void replaceMisspelling(const QString &word);
+ void viewSource();
+ bool canViewSource();
+ void focusIfNecessary();
+
+
private:
Q_DISABLE_COPY(WebContentsAdapter)
Q_DECLARE_PRIVATE(WebContentsAdapter)
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 3952067a7..85a379409 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -71,23 +71,43 @@ class WebContentsAdapter;
class WebContentsDelegateQt;
class WebEngineSettings;
-// FIXME: make this ref-counted and implicitely shared and expose as public API maybe ?
-class WebEngineContextMenuData {
+
+class WebEngineContextMenuSharedData : public QSharedData {
public:
- WebEngineContextMenuData()
- : mediaType(MediaTypeNone)
- , hasImageContent(false)
- , mediaFlags(0)
+ WebEngineContextMenuSharedData()
+ : hasImageContent(false)
, isEditable(false)
, isSpellCheckerEnabled(false)
+ , mediaType(0)
+ , mediaFlags(0)
{
}
+ bool hasImageContent;
+ bool isEditable;
+ bool isSpellCheckerEnabled;
+ uint mediaType;
+ uint mediaFlags;
+ QPoint pos;
+ QUrl linkUrl;
+ QUrl mediaUrl;
+ QString linkText;
+ QString selectedText;
+ QString suggestedFileName;
+ QString misspelledWord;
+ QStringList spellCheckerSuggestions;
+ // Some likely candidates for future additions as we add support for the related actions:
+ // bool isImageBlocked;
+ // <enum tbd> mediaType;
+ // ...
+};
+class WebEngineContextMenuData {
+public:
// Must match blink::WebContextMenuData::MediaType:
enum MediaType {
// No special node is in context.
- MediaTypeNone,
+ MediaTypeNone = 0x0,
// An image node is selected.
MediaTypeImage,
// A video node is selected.
@@ -117,25 +137,118 @@ public:
MediaCanRotate = 0x200,
};
- QPoint pos;
- QUrl linkUrl;
- QString linkText;
- QString selectedText;
- QUrl mediaUrl;
- MediaType mediaType;
- bool hasImageContent;
- uint mediaFlags;
- QString suggestedFileName;
- bool isEditable;
- bool isSpellCheckerEnabled;
- QString misspelledWord;
- QStringList spellCheckerSuggestions;
-// Some likely candidates for future additions as we add support for the related actions:
-// bool isImageBlocked;
-// <enum tbd> mediaType;
-// ...
+ WebEngineContextMenuData():d(new WebEngineContextMenuSharedData) {
+ }
+
+ void setPosition(const QPoint &pos) {
+ d->pos = pos;
+ }
+
+ QPoint position() const {
+ return d->pos;
+ }
+
+ void setLinkUrl(const QUrl &url) {
+ d->linkUrl = url;
+ }
+
+ QUrl linkUrl() const {
+ return d->linkUrl;
+ }
+
+ void setLinkText(const QString &text) {
+ d->linkText = text;
+ }
+
+ QString linkText() const {
+ return d->linkText;
+ }
+
+ void setSelectedText(const QString &text) {
+ d->selectedText = text;
+ }
+
+ QString selectedText() const {
+ return d->selectedText;
+ }
+
+ void setMediaUrl(const QUrl &url) {
+ d->mediaUrl = url;
+ }
+
+ QUrl mediaUrl() const {
+ return d->mediaUrl;
+ }
+
+ void setMediaType(MediaType type) {
+ d->mediaType = type;
+ }
+
+ MediaType mediaType() const {
+ return MediaType(d->mediaType);
+ }
+
+ void setHasImageContent(bool imageContent) {
+ d->hasImageContent = imageContent;
+ }
+
+ bool hasImageContent() const {
+ return d->hasImageContent;
+ }
+
+ void setMediaFlags(MediaFlags flags) {
+ d->mediaFlags = flags;
+ }
+
+ MediaFlags mediaFlags() const {
+ return MediaFlags(d->mediaFlags);
+ }
+
+ void setSuggestedFileName(const QString &filename) {
+ d->suggestedFileName = filename;
+ }
+
+ QString suggestedFileName() const {
+ return d->suggestedFileName;
+ }
+
+ void setIsEditable(bool editable) {
+ d->isEditable = editable;
+ }
+
+ bool isEditable() const {
+ return d->isEditable;
+ }
+
+ void setIsSpellCheckerEnabled(bool spellCheckerEnabled) {
+ d->isSpellCheckerEnabled = spellCheckerEnabled;
+ }
+
+ bool isSpellCheckerEnabled() const {
+ return d->isSpellCheckerEnabled;
+ }
+
+ void setMisspelledWord(const QString &word) {
+ d->misspelledWord = word;
+ }
+
+ QString misspelledWord() const {
+ return d->misspelledWord;
+ }
+
+ void setSpellCheckerSuggestions(const QStringList &suggestions) {
+ d->spellCheckerSuggestions = suggestions;
+ }
+
+ QStringList spellCheckerSuggestions() const {
+ return d->spellCheckerSuggestions;
+ }
+
+private:
+ QSharedDataPointer<WebEngineContextMenuSharedData> d;
};
+
class QWEBENGINE_EXPORT WebContentsAdapterClient {
public:
// This must match window_open_disposition_list.h.
@@ -227,13 +340,16 @@ public:
virtual void requestFullScreenMode(const QUrl &origin, bool fullscreen) = 0;
virtual bool isFullScreenMode() const = 0;
virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) = 0;
- virtual void runFileChooser(FilePickerController *controller) = 0;
+ virtual void runFileChooser(QSharedPointer<FilePickerController>) = 0;
virtual void showColorDialog(QSharedPointer<ColorChooserController>) = 0;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) = 0;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) = 0;
virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) = 0;
virtual void didFindText(quint64 requestId, int matchCount) = 0;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) = 0;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ virtual void didPrintPageOnPrinter(quint64 requestId, bool result) = 0;
+#endif
virtual void passOnFocus(bool reverse) = 0;
// returns the last QObject (QWidget/QQuickItem) based object in the accessibility
// hierarchy before going into the BrowserAccessibility tree
@@ -259,6 +375,7 @@ public:
const QPixmap &pixmap, const QPoint &offset) = 0;
virtual bool isEnabled() const = 0;
virtual const QObject *holdingQObject() const = 0;
+ virtual void setToolTip(const QString& toolTipText) = 0;
virtual QSharedPointer<BrowserContextAdapter> browserContextAdapter() = 0;
virtual WebContentsAdapter* webContentsAdapter() = 0;
diff --git a/src/core/web_contents_adapter_p.h b/src/core/web_contents_adapter_p.h
index 5c0e83298..23a1aaef4 100644
--- a/src/core/web_contents_adapter_p.h
+++ b/src/core/web_contents_adapter_p.h
@@ -55,7 +55,6 @@
#include <base/callback.h>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include <QScopedPointer>
#include <QSharedPointer>
@@ -84,16 +83,16 @@ public:
~WebContentsAdapterPrivate();
scoped_refptr<WebEngineContext> engineContext;
QSharedPointer<BrowserContextAdapter> browserContextAdapter;
- scoped_ptr<content::WebContents> webContents;
- scoped_ptr<WebContentsDelegateQt> webContentsDelegate;
- scoped_ptr<RenderViewObserverHostQt> renderViewObserverHost;
- scoped_ptr<WebChannelIPCTransportHost> webChannelTransport;
+ std::unique_ptr<content::WebContents> webContents;
+ std::unique_ptr<WebContentsDelegateQt> webContentsDelegate;
+ std::unique_ptr<RenderViewObserverHostQt> renderViewObserverHost;
+ std::unique_ptr<WebChannelIPCTransportHost> webChannelTransport;
QWebChannel *webChannel;
unsigned int webChannelWorld;
WebContentsAdapterClient *adapterClient;
quint64 nextRequestId;
int lastFindRequestId;
- const content::DropData *currentDropData;
+ std::unique_ptr<content::DropData> currentDropData;
Qt::DropAction currentDropAction;
bool inDragUpdateLoop;
base::Closure dragUpdateLoopQuitClosure;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index cf2121390..0f7808e51 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -118,8 +118,8 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
load_url_params.is_renderer_initiated = params.is_renderer_initiated;
load_url_params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
if (params.uses_post) {
- load_url_params.load_type = content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST;
- load_url_params.browser_initiated_post_data = params.browser_initiated_post_data;
+ load_url_params.load_type = content::NavigationController::LOAD_TYPE_HTTP_POST;
+ load_url_params.post_data = params.post_data;
}
target->GetController().LoadURLWithParams(load_url_params);
@@ -318,18 +318,19 @@ ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple, content::FileChooserParam
ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder, content::FileChooserParams::UploadFolder)
ASSERT_ENUMS_MATCH(FilePickerController::Save, content::FileChooserParams::Save)
-void WebContentsDelegateQt::RunFileChooser(content::WebContents *web_contents, const content::FileChooserParams &params)
+void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost *frameHost, const content::FileChooserParams &params)
{
QStringList acceptedMimeTypes;
acceptedMimeTypes.reserve(params.accept_types.size());
for (std::vector<base::string16>::const_iterator it = params.accept_types.begin(); it < params.accept_types.end(); ++it)
acceptedMimeTypes.append(toQt(*it));
- FilePickerController *controller = new FilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode), web_contents, toQt(params.default_file_name.value()), acceptedMimeTypes);
+ m_filePickerController.reset(new FilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode),
+ web_contents(), toQt(params.default_file_name.value()), acceptedMimeTypes));
// Defer the call to not block base::MessageLoop::RunTask with modal dialogs.
- QTimer::singleShot(0, [this, controller] () {
- m_viewClient->runFileChooser(controller);
+ QTimer::singleShot(0, [this] () {
+ m_viewClient->runFileChooser(m_filePickerController);
});
}
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index d523aa16b..dad1e50f1 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/common/permission_status.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
#include "base/callback.h"
@@ -70,6 +69,23 @@ namespace QtWebEngineCore {
class WebContentsAdapterClient;
+class SavePageInfo
+{
+public:
+ SavePageInfo()
+ : requestedFormat(-1)
+ {
+ }
+
+ SavePageInfo(const QString &filePath, int format)
+ : requestedFilePath(filePath), requestedFormat(format)
+ {
+ }
+
+ QString requestedFilePath;
+ int requestedFormat;
+};
+
class WebContentsDelegateQt : public content::WebContentsDelegate
, public content::WebContentsObserver
{
@@ -92,7 +108,7 @@ public:
virtual void EnterFullscreenModeForTab(content::WebContents* web_contents, const GURL& origin) Q_DECL_OVERRIDE;
virtual void ExitFullscreenModeForTab(content::WebContents*) Q_DECL_OVERRIDE;
virtual bool IsFullscreenForTabOrPending(const content::WebContents* web_contents) const Q_DECL_OVERRIDE;
- virtual void RunFileChooser(content::WebContents *, const content::FileChooserParams &params) Q_DECL_OVERRIDE;
+ virtual void RunFileChooser(content::RenderFrameHost* render_frame_host, const content::FileChooserParams& params) Q_DECL_OVERRIDE;
virtual bool AddMessageToConsole(content::WebContents* source, int32_t level, const base::string16& message, int32_t line_no, const base::string16& source_id) Q_DECL_OVERRIDE;
virtual void FindReply(content::WebContents *source, int request_id, int number_of_matches, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) Q_DECL_OVERRIDE;
virtual void RequestMediaAccessPermission(content::WebContents* web_contents, const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback) Q_DECL_OVERRIDE;
@@ -126,6 +142,9 @@ public:
void launchExternalURL(const QUrl &url, ui::PageTransition page_transition, bool is_main_frame);
FaviconManager *faviconManager();
+ void setSavePageInfo(const SavePageInfo &spi) { m_savePageInfo = spi; }
+ const SavePageInfo &savePageInfo() { return m_savePageInfo; }
+
private:
QWeakPointer<WebContentsAdapter> createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
@@ -134,6 +153,8 @@ private:
int m_lastReceivedFindReply;
QVector<int64_t> m_loadingErrorFrameList;
QScopedPointer<FaviconManager> m_faviconManager;
+ SavePageInfo m_savePageInfo;
+ QSharedPointer<FilePickerController> m_filePickerController;
};
} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index e487fca46..ed6fdabff 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -155,19 +155,19 @@ ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaCanRotate, blink::WebContextMe
static inline WebEngineContextMenuData fromParams(const content::ContextMenuParams &params)
{
WebEngineContextMenuData ret;
- ret.pos = QPoint(params.x, params.y);
- ret.linkUrl = toQt(params.link_url);
- ret.linkText = toQt(params.link_text.data());
- ret.selectedText = toQt(params.selection_text.data());
- ret.mediaUrl = toQt(params.src_url);
- ret.mediaType = (WebEngineContextMenuData::MediaType)params.media_type;
- ret.hasImageContent = params.has_image_contents;
- ret.mediaFlags = params.media_flags;
- ret.suggestedFileName = toQt(params.suggested_filename.data());
- ret.isEditable = params.is_editable;
+ ret.setPosition(QPoint(params.x, params.y));
+ ret.setLinkUrl(toQt(params.link_url));
+ ret.setLinkText(toQt(params.link_text.data()));
+ ret.setSelectedText(toQt(params.selection_text.data()));
+ ret.setMediaUrl(toQt(params.src_url));
+ ret.setMediaType((WebEngineContextMenuData::MediaType)params.media_type);
+ ret.setHasImageContent(params.has_image_contents);
+ ret.setMediaFlags((WebEngineContextMenuData::MediaFlags)params.media_flags);
+ ret.setSuggestedFileName(toQt(params.suggested_filename.data()));
+ ret.setIsEditable(params.is_editable);
#if defined(ENABLE_SPELLCHECK)
- ret.misspelledWord = toQt(params.misspelled_word);
- ret.spellCheckerSuggestions = fromVector(params.dictionary_suggestions);
+ ret.setMisspelledWord(toQt(params.misspelled_word));
+ ret.setSpellCheckerSuggestions(fromVector(params.dictionary_suggestions));
#endif
return ret;
}
@@ -183,7 +183,7 @@ void WebContentsViewQt::ShowContextMenu(content::RenderFrameHost *, const conten
// must be initialized to true due to the way how the initialization sequence
// in SpellCheck works ie. typing the first word triggers the creation
// of the SpellcheckService. Use user preference store instead.
- contextMenuData.isSpellCheckerEnabled = m_client->browserContextAdapter()->isSpellCheckEnabled();
+ contextMenuData.setIsSpellCheckerEnabled(m_client->browserContextAdapter()->isSpellCheckEnabled());
#endif
m_client->contextMenuRequested(contextMenuData);
}
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 39e11a96d..227918d51 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -51,6 +51,7 @@
#if defined(ENABLE_BASIC_PRINTING)
#include "chrome/browser/printing/print_job_manager.h"
#endif // defined(ENABLE_BASIC_PRINTING)
+#include "components/devtools_http_handler/devtools_http_handler.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/utility_process_host_impl.h"
@@ -87,7 +88,9 @@
#include <QFileInfo>
#include <QGuiApplication>
#include <QOffscreenSurface>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <QStringList>
#include <QSurfaceFormat>
#include <QVector>
@@ -95,9 +98,11 @@
using namespace QtWebEngineCore;
+#ifndef QT_NO_OPENGL
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace {
@@ -114,6 +119,7 @@ void destroyContext()
s_destroyed = true;
}
+#ifndef QT_NO_OPENGL
bool usingANGLE()
{
#if defined(Q_OS_WIN)
@@ -150,12 +156,16 @@ bool usingQtQuick2DRenderer()
}
if (device.isEmpty())
+ device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
+ if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE"));
+ if (device.isEmpty())
+ device = QLatin1String("default");
- // This assumes that the plugin is installed and is going to be used by QtQuick.
- return device == QLatin1String("softwarecontext");
+ // Anything other than the default OpenGL device will need to render in 2D mode.
+ return device != QLatin1String("default");
}
-
+#endif //QT_NO_OPENGL
#if defined(ENABLE_PLUGINS)
void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&)
{
@@ -294,6 +304,9 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableZeroCopy);
parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferCompositorResources);
+ // Enabled on OS X and Linux but currently not working. It worked in 5.7 on OS X.
+ parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
+
if (useEmbeddedSwitches) {
// Inspired by the Android port's default switches
if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar))
@@ -312,6 +325,7 @@ WebEngineContext::WebEngineContext()
GLContextHelper::initialize();
const char *glType = 0;
+#ifndef QT_NO_OPENGL
if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
// If the native handle is QEGLNativeContext try to use GL ES/2, if there is no native handle
@@ -323,7 +337,7 @@ WebEngineContext::WebEngineContext()
|| !strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext"))
{
if (qt_gl_global_share_context()->isOpenGLES()) {
- glType = gfx::kGLImplementationEGLName;
+ glType = gl::kGLImplementationEGLName;
} else {
QOpenGLContext context;
QSurfaceFormat format;
@@ -341,7 +355,7 @@ WebEngineContext::WebEngineContext()
if (context.makeCurrent(&surface)) {
if (context.hasExtension("GL_ARB_ES2_compatibility"))
- glType = gfx::kGLImplementationEGLName;
+ glType = gl::kGLImplementationEGLName;
context.doneCurrent();
}
@@ -351,12 +365,13 @@ WebEngineContext::WebEngineContext()
}
} else {
if (!qt_gl_global_share_context()->isOpenGLES())
- glType = gfx::kGLImplementationDesktopName;
+ glType = gl::kGLImplementationDesktopName;
}
} else {
qWarning("WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.");
}
}
+#endif
if (glType)
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
@@ -387,6 +402,8 @@ WebEngineContext::WebEngineContext()
// first gets referenced on the IO thread.
MediaCaptureDevicesDispatcher::GetInstance();
+ base::ThreadRestrictions::SetIOAllowed(true);
+
#if defined(ENABLE_PLUGINS)
// Creating pepper plugins from the page (which calls PluginService::GetPluginInfoArray)
// might fail unless the page queried the list of available plugins at least once
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h
index 960f8ed47..878b651de 100644
--- a/src/core/web_engine_context.h
+++ b/src/core/web_engine_context.h
@@ -43,9 +43,7 @@
#include "qtwebenginecoreglobal.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "components/devtools_http_handler/devtools_http_handler.h"
#include <QSharedPointer>
@@ -58,6 +56,10 @@ class BrowserMainRunner;
class ContentMainRunner;
}
+namespace devtools_http_handler {
+class DevToolsHttpHandler;
+}
+
#if defined(ENABLE_BASIC_PRINTING)
namespace printing {
class PrintJobManager;
@@ -89,15 +91,15 @@ private:
WebEngineContext();
~WebEngineContext();
- scoped_ptr<base::RunLoop> m_runLoop;
- scoped_ptr<ContentMainDelegateQt> m_mainDelegate;
- scoped_ptr<content::ContentMainRunner> m_contentRunner;
- scoped_ptr<content::BrowserMainRunner> m_browserRunner;
+ std::unique_ptr<base::RunLoop> m_runLoop;
+ std::unique_ptr<ContentMainDelegateQt> m_mainDelegate;
+ std::unique_ptr<content::ContentMainRunner> m_contentRunner;
+ std::unique_ptr<content::BrowserMainRunner> m_browserRunner;
QObject* m_globalQObject;
QSharedPointer<QtWebEngineCore::BrowserContextAdapter> m_defaultBrowserContext;
- scoped_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
+ std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
#if defined(ENABLE_BASIC_PRINTING)
- scoped_ptr<printing::PrintJobManager> m_printJobManager;
+ std::unique_ptr<printing::PrintJobManager> m_printJobManager;
#endif // defined(ENABLE_BASIC_PRINTING)
};
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 399e36765..40977812d 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -69,7 +69,7 @@ QString fallbackDir() {
return directory;
}
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
static inline CFBundleRef frameworkBundle()
{
return CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.Qt.QtWebEngineCore"));
@@ -112,6 +112,34 @@ static QString getResourcesPath(CFBundleRef frameworkBundle)
}
#endif
+#if defined(OS_MACOSX)
+static QString getMainApplicationResourcesPath()
+{
+ QString resourcesPath;
+ CFBundleRef mainBundle = CFBundleGetMainBundle();
+ if (!mainBundle)
+ return resourcesPath;
+
+ // Will point to Resources inside an app bundle, or in case if the application is not packaged
+ // as a bundle, will point to the application directory, where the resources are assumed to be
+ // found.
+ CFURLRef resourcesRelativeUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
+ if (!resourcesRelativeUrl)
+ return resourcesPath;
+
+ CFURLRef resourcesAbsoluteUrl = CFURLCopyAbsoluteURL(resourcesRelativeUrl);
+ CFStringRef resourcesAbolutePath = CFURLCopyFileSystemPath(resourcesAbsoluteUrl,
+ kCFURLPOSIXPathStyle);
+ resourcesPath = QString::fromCFString(resourcesAbolutePath);
+ CFRelease(resourcesAbolutePath);
+ CFRelease(resourcesAbsoluteUrl);
+ CFRelease(resourcesRelativeUrl);
+
+ return resourcesPath;
+}
+
+#endif
+
QString subProcessPath()
{
static QString processPath;
@@ -181,18 +209,42 @@ QString localesPath()
#if defined(ENABLE_SPELLCHECK)
QString dictionariesPath()
{
+ static QString potentialDictionariesPath;
+ static bool initialized = false;
+ QStringList candidatePaths;
+ if (!initialized) {
+ initialized = true;
+
+ // First try to find dictionaries near the application.
+#ifdef OS_MACOSX
+ QString resourcesDictionariesPath = getMainApplicationResourcesPath()
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << resourcesDictionariesPath;
+#endif
+ QString applicationDictionariesPath = QCoreApplication::applicationDirPath()
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << applicationDictionariesPath;
+
+ // Then try to find dictionaries near the installed library.
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
- return getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_dictionaries");
-#else
- // first local path
- static QString potentialDictionariesPath = QCoreApplication::applicationDirPath() % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ QString frameworkDictionariesPath = getResourcesPath(frameworkBundle())
+ % QLatin1String("/qtwebengine_dictionaries");
+ candidatePaths << frameworkDictionariesPath;
+#endif
- // now global one
- if (!QFileInfo::exists(potentialDictionariesPath))
- potentialDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ QString libraryDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath)
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << libraryDictionariesPath;
+
+ Q_FOREACH (const QString &candidate, candidatePaths) {
+ if (QFileInfo::exists(candidate)) {
+ potentialDictionariesPath = candidate;
+ break;
+ }
+ }
+ }
return potentialDictionariesPath;
-#endif
}
#endif // ENABLE_SPELLCHECK
@@ -303,8 +355,16 @@ base::string16 WebEngineLibraryInfo::getApplicationName()
std::string WebEngineLibraryInfo::getApplicationLocale()
{
base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
- if (!parsedCommandLine->HasSwitch(switches::kLang))
- return QLocale().bcp47Name().toStdString();
+ if (!parsedCommandLine->HasSwitch(switches::kLang)) {
+ const QString &locale = QLocale().bcp47Name();
+
+ // QLocale::bcp47Name returns "en" for American English locale. Chromium requires the "US" suffix
+ // to clarify the dialect and ignores the shorter version.
+ if (locale == "en")
+ return "en-US";
+
+ return locale.toStdString();
+ }
return parsedCommandLine->GetSwitchValueASCII(switches::kLang);
}
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index fb0f7e839..c17177745 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -239,6 +239,8 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
s_defaultAttributes.insert(Accelerated2dCanvasEnabled, accelerated2dCanvas);
s_defaultAttributes.insert(AutoLoadIconsForPage, true);
s_defaultAttributes.insert(TouchIconsEnabled, false);
+ s_defaultAttributes.insert(FocusOnNavigationEnabled, true);
+ s_defaultAttributes.insert(PrintElementBackgrounds, true);
s_defaultAttributes.insert(AllowRunningInsecureContent, allowRunningInsecureContent);
}
if (offTheRecord)
@@ -316,6 +318,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->fullscreen_supported = testAttribute(FullScreenSupportEnabled);
prefs->accelerated_2d_canvas_enabled = testAttribute(Accelerated2dCanvasEnabled);
prefs->experimental_webgl_enabled = testAttribute(WebGLEnabled);
+ prefs->should_print_backgrounds = testAttribute(PrintElementBackgrounds);
prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent);
// Fonts settings.
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index e131af50c..8459ba75b 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -80,6 +80,8 @@ public:
Accelerated2dCanvasEnabled,
AutoLoadIconsForPage,
TouchIconsEnabled,
+ FocusOnNavigationEnabled,
+ PrintElementBackgrounds,
AllowRunningInsecureContent
};
diff --git a/src/core/web_engine_visited_links_manager.cpp b/src/core/web_engine_visited_links_manager.cpp
index ded9d5d24..0cf76d456 100644
--- a/src/core/web_engine_visited_links_manager.cpp
+++ b/src/core/web_engine_visited_links_manager.cpp
@@ -44,7 +44,6 @@
#include "content_browser_client_qt.h"
#include "type_conversion.h"
-#include "base/memory/scoped_ptr.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "components/visitedlink/browser/visitedlink_master.h"
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 80850af70..4f5023376 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -66,6 +66,9 @@
#include "web_event_factory.h"
#include "third_party/WebKit/Source/platform/WindowsKeyboardCodes.h"
+#include "ui/events/keycodes/dom/dom_code.h"
+#include "ui/events/keycodes/dom/dom_key.h"
+#include "ui/events/keycodes/dom/keycode_converter.h"
#include <QCoreApplication>
#include <QElapsedTimer>
@@ -471,6 +474,552 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
}
}
+/*
+ * List of the available DOM key values can be found in the
+ * chromium/ui/events/keycodes/dom/dom_key_data_inc file.
+ * Some of the DOM keys are currently unsupported in Qt:
+ *
+ * Modifier Keys:
+ * - ui::DomKey::ACCEL
+ * - ui::DomKey::FN
+ * - ui::DomKey::FN_LOCK
+ * - ui::DomKey::SYMBOL
+ * - ui::DomKey::SYMBOL_LOCK
+ * - ui::DomKey::SHIFT_LEVEL5
+ * - ui::DomKey::ALT_GRAPH_LATCH
+ *
+ * Editing Keys:
+ * - ui::DomKey::CR_SEL
+ * - ui::DomKey::ERASE_OF
+ * - ui::DomKey::EX_SEL
+ *
+ * UI Keys:
+ * - ui::DomKey::ACCEPT
+ * - ui::DomKey::AGAIN
+ * - ui::DomKey::ATTN
+ * - ui::DomKey::PROPS
+ *
+ * Device Keys:
+ * - ui::DomKey::POWER
+ *
+ * IME and Composition Keys:
+ * - ui::DomKey::ALL_CANDIDATES
+ * - ui::DomKey::ALPHANUMERIC
+ * - ui::DomKey::FINAL_MODE
+ * - ui::DomKey::GROUP_FIRST
+ * - ui::DomKey::GROUP_LAST
+ * - ui::DomKey::GROUP_NEXT
+ * - ui::DomKey::GROUP_PREVIOUS
+ * - ui::DomKey::NEXT_CANDIDATE
+ * - ui::DomKey::PREVIOUS_CANDIDATE
+ * - ui::DomKey::PROCESS
+ * - ui::DomKey::JUNJA_MODE
+ *
+ * General-Purpose Function Keys:
+ * - ui::DomKey::SOFT1
+ * - ui::DomKey::SOFT2
+ * - ui::DomKey::SOFT3
+ * - ui::DomKey::SOFT4
+ * - ui::DomKey::SOFT5
+ * - ui::DomKey::SOFT6
+ * - ui::DomKey::SOFT7
+ * - ui::DomKey::SOFT8
+ *
+ * Multimedia Numpad Keys:
+ * - ui::DomKey::KEY11
+ * - ui::DomKey::KEY12
+ *
+ * Audio Keys:
+ * - ui::DomKey::AUDIO_BALANCE_LEFT
+ * - ui::DomKey::AUDIO_BALANCE_RIGHT
+ * - ui::DomKey::AUDIO_BASS_BOOST_DOWN
+ * - ui::DomKey::AUDIO_BASS_BOOST_UP
+ * - ui::DomKey::AUDIO_FADER_FRONT
+ * - ui::DomKey::AUDIO_FADER_REAR
+ * - ui::DomKey::AUDIO_SURROUND_MODE_NEXT
+ * - ui::DomKey::MICROPHONE_TOGGLE
+ *
+ * Speech Keys:
+ * - ui::DomKey::SPEECH_CORRECTION_LIST
+ * - ui::DomKey::SPEECH_INPUT_TOGGLE
+ *
+ * Application Keys:
+ * - ui::DomKey::LAUNCH_CONTACTS
+ *
+ * Mobile Phone Keys:
+ * - ui::DomKey::APP_SWITCH
+ * - ui::DomKey::GO_BACK
+ * - ui::DomKey::GO_HOME
+ * - ui::DomKey::HEADSET_HOOK
+ * - ui::DomKey::NOTIFICATION
+ * - ui::DomKey::MANNER_MODE
+ *
+ * TV Keys:
+ * - ui::DomKey::TV
+ * - ui::DomKey::TV_3D_MODE
+ * - ui::DomKey::TV_ANTENNA_CABLE
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION_MIX_DOWN
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION_MIX_UP
+ * - ui::DomKey::TV_CONTENTS_MENU
+ * - ui::DomKey::TV_DATA_SERVICE
+ * - ui::DomKey::TV_INPUT
+ * - ui::DomKey::TV_INPUT_COMPONENT1
+ * - ui::DomKey::TV_INPUT_COMPONENT2
+ * - ui::DomKey::TV_INPUT_COMPOSITE1
+ * - ui::DomKey::TV_INPUT_COMPOSITE2
+ * - ui::DomKey::TV_INPUT_HDMI1
+ * - ui::DomKey::TV_INPUT_HDMI2
+ * - ui::DomKey::TV_INPUT_HDMI3
+ * - ui::DomKey::TV_INPUT_HDMI4
+ * - ui::DomKey::TV_INPUT_VGA1
+ * - ui::DomKey::TV_MEDIA_CONTEXT
+ * - ui::DomKey::TV_NETWORK
+ * - ui::DomKey::TV_NUMBER_ENTRY
+ * - ui::DomKey::TV_POWER
+ * - ui::DomKey::TV_RADIO_SERVICE
+ * - ui::DomKey::TV_SATELLITE
+ * - ui::DomKey::TV_SATELLITE_BC
+ * - ui::DomKey::TV_SATELLITE_CS
+ * - ui::DomKey::TV_SATELLITE_TOGGLE
+ * - ui::DomKey::TV_TERRESTRIAL_ANALOG
+ * - ui::DomKey::TV_TERRESTRIAL_DIGITAL
+ * - ui::DomKey::TV_TIMER
+ *
+ * Media Controller Keys:
+ * - ui::DomKey::AVR_INPUT
+ * - ui::DomKey::AVR_POWER
+ * - ui::DomKey::COLOR_F4_GREY
+ * - ui::DomKey::COLOR_F5_BROWN
+ * - ui::DomKey::CLOSED_CAPTION_TOGGLE
+ * - ui::DomKey::DVR
+ * - ui::DomKey::FAVORITE_CLEAR0
+ * - ui::DomKey::FAVORITE_CLEAR1
+ * - ui::DomKey::FAVORITE_CLEAR2
+ * - ui::DomKey::FAVORITE_CLEAR3
+ * - ui::DomKey::FAVORITE_RECALL0
+ * - ui::DomKey::FAVORITE_RECALL1
+ * - ui::DomKey::FAVORITE_RECALL2
+ * - ui::DomKey::FAVORITE_RECALL3
+ * - ui::DomKey::FAVORITE_STORE0
+ * - ui::DomKey::FAVORITE_STORE1
+ * - ui::DomKey::FAVORITE_STORE2
+ * - ui::DomKey::FAVORITE_STORE3
+ * - ui::DomKey::GUIDE_NEXT_DAY
+ * - ui::DomKey::GUIDE_PREVIOUS_DAY
+ * - ui::DomKey::INSTANT_REPLAY
+ * - ui::DomKey::LINK
+ * - ui::DomKey::LIST_PROGRAM
+ * - ui::DomKey::LIVE_CONTENT
+ * - ui::DomKey::LOCK
+ * - ui::DomKey::MEDIA_APPS
+ * - ui::DomKey::MEDIA_AUDIO_TRACK
+ * - ui::DomKey::MEDIA_SKIP_BACKWARD
+ * - ui::DomKey::MEDIA_SKIP_FORWARD
+ * - ui::DomKey::MEDIA_SKIP
+ * - ui::DomKey::MEDIA_STEP_BACKWARD
+ * - ui::DomKey::MEDIA_STEP_FORWARD
+ * - ui::DomKey::NAVIGATE_IN
+ * - ui::DomKey::NAVIGATE_NEXT
+ * - ui::DomKey::NAVIGATE_OUT
+ * - ui::DomKey::NAVIGATE_PREVIOUS
+ * - ui::DomKey::NEXT_FAVORITE_CHANNEL
+ * - ui::DomKey::NEXT_USER_PROFILE
+ * - ui::DomKey::ON_DEMAND
+ * - ui::DomKey::PAIRING
+ * - ui::DomKey::PINP_DOWN
+ * - ui::DomKey::PINP_MOVE
+ * - ui::DomKey::PINP_TOGGLE
+ * - ui::DomKey::PINP_UP
+ * - ui::DomKey::PLAY_SPEED_DOWN
+ * - ui::DomKey::PLAY_SPEED_RESET
+ * - ui::DomKey::PLAY_SPEED_UP
+ * - ui::DomKey::RC_LOW_BATTERY
+ * - ui::DomKey::RECORD_SPEED_NEXT
+ * - ui::DomKey::RF_BYPASS
+ * - ui::DomKey::SCAN_CHANNELS_TOGGLE
+ * - ui::DomKey::SCREEN_MODE_NEXT
+ * - ui::DomKey::STB_INPUT
+ * - ui::DomKey::STB_POWER
+ * - ui::DomKey::TELETEXT
+ * - ui::DomKey::VIDEO_MODE_NEXT
+ * - ui::DomKey::WINK
+ */
+static ui::DomKey getDomKeyFromQKeyEvent(QKeyEvent *ev)
+{
+ if (!ev->text().isEmpty())
+ return ui::DomKey::FromCharacter(ev->text().toUcs4().first());
+
+ switch (ev->key()) {
+ case Qt::Key_Backspace:
+ return ui::DomKey::BACKSPACE;
+ case Qt::Key_Tab:
+ case Qt::Key_Backtab:
+ return ui::DomKey::TAB;
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
+ return ui::DomKey::ENTER;
+ case Qt::Key_Escape:
+ return ui::DomKey::ESCAPE;
+ case Qt::Key_Delete:
+ return ui::DomKey::DEL;
+
+ // Special Key Values
+ case Qt::Key_unknown:
+ return ui::DomKey::UNIDENTIFIED;
+
+ // Modifier Keys
+ case Qt::Key_Alt:
+ return ui::DomKey::ALT;
+ case Qt::Key_AltGr:
+ return ui::DomKey::ALT_GRAPH;
+ case Qt::Key_CapsLock:
+ return ui::DomKey::CAPS_LOCK;
+ case Qt::Key_Control:
+ return ui::DomKey::CONTROL;
+ case Qt::Key_Hyper_L:
+ case Qt::Key_Hyper_R:
+ return ui::DomKey::HYPER;
+ case Qt::Key_Meta:
+ return ui::DomKey::META;
+ case Qt::Key_NumLock:
+ return ui::DomKey::NUM_LOCK;
+ case Qt::Key_ScrollLock:
+ return ui::DomKey::SCROLL_LOCK;
+ case Qt::Key_Shift:
+ return ui::DomKey::SHIFT;
+ case Qt::Key_Super_L:
+ case Qt::Key_Super_R:
+ return ui::DomKey::SUPER;
+
+ // Navigation Keys
+ case Qt::Key_Down:
+ return ui::DomKey::ARROW_DOWN;
+ case Qt::Key_Left:
+ return ui::DomKey::ARROW_LEFT;
+ case Qt::Key_Right:
+ return ui::DomKey::ARROW_RIGHT;
+ case Qt::Key_Up:
+ return ui::DomKey::ARROW_UP;
+ case Qt::Key_End:
+ return ui::DomKey::END;
+ case Qt::Key_Home:
+ return ui::DomKey::HOME;
+ case Qt::Key_PageUp:
+ return ui::DomKey::PAGE_UP;
+ case Qt::Key_PageDown:
+ return ui::DomKey::PAGE_DOWN;
+
+ // Editing Keys
+ case Qt::Key_Clear:
+ return ui::DomKey::CLEAR;
+ case Qt::Key_Copy:
+ return ui::DomKey::COPY;
+ case Qt::Key_Cut:
+ return ui::DomKey::CUT;
+ case Qt::Key_Insert:
+ return ui::DomKey::INSERT;
+ case Qt::Key_Paste:
+ return ui::DomKey::PASTE;
+ case Qt::Key_Redo:
+ return ui::DomKey::REDO;
+ case Qt::Key_Undo:
+ return ui::DomKey::UNDO;
+
+ // UI Keys
+ case Qt::Key_Cancel:
+ return ui::DomKey::CANCEL;
+ case Qt::Key_Menu:
+ return ui::DomKey::CONTEXT_MENU;
+ case Qt::Key_Execute:
+ return ui::DomKey::EXECUTE;
+ case Qt::Key_Find:
+ return ui::DomKey::FIND;
+ case Qt::Key_Help:
+ return ui::DomKey::HELP;
+ case Qt::Key_Pause:
+ return ui::DomKey::PAUSE;
+ case Qt::Key_Play:
+ return ui::DomKey::PLAY;
+ case Qt::Key_Select:
+ return ui::DomKey::SELECT;
+ case Qt::Key_ZoomIn:
+ return ui::DomKey::ZOOM_IN;
+ case Qt::Key_ZoomOut:
+ return ui::DomKey::ZOOM_OUT;
+
+ // Device Keys
+ case Qt::Key_MonBrightnessDown:
+ return ui::DomKey::BRIGHTNESS_DOWN;
+ case Qt::Key_MonBrightnessUp:
+ return ui::DomKey::BRIGHTNESS_UP;
+ case Qt::Key_Eject:
+ return ui::DomKey::EJECT;
+ case Qt::Key_LogOff:
+ return ui::DomKey::LOG_OFF;
+ case Qt::Key_PowerDown:
+ case Qt::Key_PowerOff:
+ return ui::DomKey::POWER_OFF;
+ case Qt::Key_Print:
+ return ui::DomKey::PRINT_SCREEN;
+ case Qt::Key_Hibernate:
+ return ui::DomKey::HIBERNATE;
+ case Qt::Key_Standby:
+ return ui::DomKey::STANDBY;
+ case Qt::Key_WakeUp:
+ return ui::DomKey::WAKE_UP;
+
+ // IME and Composition Keys
+ case Qt::Key_Codeinput:
+ return ui::DomKey::CODE_INPUT;
+ case Qt::Key_Multi_key:
+ return ui::DomKey::COMPOSE;
+ case Qt::Key_Henkan:
+ return ui::DomKey::CONVERT;
+ case Qt::Key_Mode_switch:
+ return ui::DomKey::MODE_CHANGE;
+ case Qt::Key_Muhenkan:
+ return ui::DomKey::NON_CONVERT;
+ case Qt::Key_SingleCandidate:
+ return ui::DomKey::SINGLE_CANDIDATE;
+ case Qt::Key_Hangul:
+ return ui::DomKey::HANGUL_MODE;
+ case Qt::Key_Hangul_Hanja:
+ return ui::DomKey::HANJA_MODE;
+ case Qt::Key_Eisu_Shift:
+ case Qt::Key_Eisu_toggle:
+ return ui::DomKey::EISU;
+ case Qt::Key_Hankaku:
+ return ui::DomKey::HANKAKU;
+ case Qt::Key_Hiragana:
+ return ui::DomKey::HIRAGANA;
+ case Qt::Key_Hiragana_Katakana:
+ return ui::DomKey::HIRAGANA_KATAKANA;
+ case Qt::Key_Kana_Lock:
+ case Qt::Key_Kana_Shift:
+ return ui::DomKey::KANA_MODE;
+ case Qt::Key_Kanji:
+ return ui::DomKey::KANJI_MODE;
+ case Qt::Key_Katakana:
+ return ui::DomKey::KATAKANA;
+ case Qt::Key_Romaji:
+ return ui::DomKey::ROMAJI;
+ case Qt::Key_Zenkaku:
+ return ui::DomKey::ZENKAKU;
+ case Qt::Key_Zenkaku_Hankaku:
+ return ui::DomKey::ZENKAKU_HANKAKU;
+
+ // General-Purpose Function Keys
+ case Qt::Key_F1:
+ return ui::DomKey::F1;
+ case Qt::Key_F2:
+ return ui::DomKey::F2;
+ case Qt::Key_F3:
+ return ui::DomKey::F3;
+ case Qt::Key_F4:
+ return ui::DomKey::F4;
+ case Qt::Key_F5:
+ return ui::DomKey::F5;
+ case Qt::Key_F6:
+ return ui::DomKey::F6;
+ case Qt::Key_F7:
+ return ui::DomKey::F7;
+ case Qt::Key_F8:
+ return ui::DomKey::F8;
+ case Qt::Key_F9:
+ return ui::DomKey::F9;
+ case Qt::Key_F10:
+ return ui::DomKey::F10;
+ case Qt::Key_F11:
+ return ui::DomKey::F11;
+ case Qt::Key_F12:
+ return ui::DomKey::F12;
+ case Qt::Key_F13:
+ return ui::DomKey::F13;
+ case Qt::Key_F14:
+ return ui::DomKey::F14;
+ case Qt::Key_F15:
+ return ui::DomKey::F15;
+ case Qt::Key_F16:
+ return ui::DomKey::F16;
+ case Qt::Key_F17:
+ return ui::DomKey::F17;
+ case Qt::Key_F18:
+ return ui::DomKey::F18;
+ case Qt::Key_F19:
+ return ui::DomKey::F19;
+ case Qt::Key_F20:
+ return ui::DomKey::F20;
+ case Qt::Key_F21:
+ return ui::DomKey::F21;
+ case Qt::Key_F22:
+ return ui::DomKey::F22;
+ case Qt::Key_F23:
+ return ui::DomKey::F23;
+ case Qt::Key_F24:
+ return ui::DomKey::F24;
+
+ // Multimedia Keys
+ case Qt::Key_ChannelDown:
+ return ui::DomKey::CHANNEL_DOWN;
+ case Qt::Key_ChannelUp:
+ return ui::DomKey::CHANNEL_UP;
+ case Qt::Key_Close:
+ return ui::DomKey::CLOSE;
+ case Qt::Key_MailForward:
+ return ui::DomKey::MAIL_FORWARD;
+ case Qt::Key_Reply:
+ return ui::DomKey::MAIL_REPLY;
+ case Qt::Key_Send:
+ return ui::DomKey::MAIL_SEND;
+ case Qt::Key_AudioForward:
+ return ui::DomKey::MEDIA_FAST_FORWARD;
+ case Qt::Key_MediaPause:
+ return ui::DomKey::MEDIA_PAUSE;
+ case Qt::Key_MediaPlay:
+ return ui::DomKey::MEDIA_PLAY;
+ case Qt::Key_MediaTogglePlayPause:
+ return ui::DomKey::MEDIA_PLAY_PAUSE;
+ case Qt::Key_MediaRecord:
+ return ui::DomKey::MEDIA_RECORD;
+ case Qt::Key_AudioRewind:
+ return ui::DomKey::MEDIA_REWIND;
+ case Qt::Key_MediaStop:
+ return ui::DomKey::MEDIA_STOP;
+ case Qt::Key_MediaNext:
+ return ui::DomKey::MEDIA_TRACK_NEXT;
+ case Qt::Key_MediaPrevious:
+ return ui::DomKey::MEDIA_TRACK_PREVIOUS;
+ case Qt::Key_New:
+ return ui::DomKey::NEW;
+ case Qt::Key_Open:
+ return ui::DomKey::OPEN;
+ case Qt::Key_Printer:
+ return ui::DomKey::PRINT;
+ case Qt::Key_Save:
+ return ui::DomKey::SAVE;
+ case Qt::Key_Spell:
+ return ui::DomKey::SPELL_CHECK;
+
+ // Audio Keys
+ case Qt::Key_BassDown:
+ return ui::DomKey::AUDIO_BASS_DOWN;
+ case Qt::Key_BassBoost:
+ return ui::DomKey::AUDIO_BASS_BOOST_TOGGLE;
+ case Qt::Key_BassUp:
+ return ui::DomKey::AUDIO_BASS_UP;
+ case Qt::Key_TrebleDown:
+ return ui::DomKey::AUDIO_TREBLE_DOWN;
+ case Qt::Key_TrebleUp:
+ return ui::DomKey::AUDIO_TREBLE_UP;
+ case Qt::Key_VolumeDown:
+ return ui::DomKey::AUDIO_VOLUME_DOWN;
+ case Qt::Key_VolumeUp:
+ return ui::DomKey::AUDIO_VOLUME_UP;
+ case Qt::Key_VolumeMute:
+ return ui::DomKey::AUDIO_VOLUME_MUTE;
+ case Qt::Key_MicVolumeDown:
+ return ui::DomKey::MICROPHONE_VOLUME_DOWN;
+ case Qt::Key_MicVolumeUp:
+ return ui::DomKey::MICROPHONE_VOLUME_UP;
+ case Qt::Key_MicMute:
+ return ui::DomKey::MICROPHONE_VOLUME_MUTE;
+
+ // Application Keys
+ case Qt::Key_Calculator:
+ return ui::DomKey::LAUNCH_CALCULATOR;
+ case Qt::Key_Calendar:
+ return ui::DomKey::LAUNCH_CALENDAR;
+ case Qt::Key_LaunchMail:
+ return ui::DomKey::LAUNCH_MAIL;
+ case Qt::Key_LaunchMedia:
+ return ui::DomKey::LAUNCH_MEDIA_PLAYER;
+ case Qt::Key_Music:
+ return ui::DomKey::LAUNCH_MUSIC_PLAYER;
+ case Qt::Key_Launch0:
+ return ui::DomKey::LAUNCH_MY_COMPUTER;
+ case Qt::Key_Phone:
+ return ui::DomKey::LAUNCH_PHONE;
+ case Qt::Key_ScreenSaver:
+ return ui::DomKey::LAUNCH_SCREEN_SAVER;
+ case Qt::Key_Excel:
+ return ui::DomKey::LAUNCH_SPREADSHEET;
+ case Qt::Key_WWW:
+ return ui::DomKey::LAUNCH_WEB_BROWSER;
+ case Qt::Key_WebCam:
+ return ui::DomKey::LAUNCH_WEB_CAM;
+ case Qt::Key_Word:
+ return ui::DomKey::LAUNCH_WORD_PROCESSOR;
+
+ // Browser Keys
+ case Qt::Key_Back:
+ return ui::DomKey::BROWSER_BACK;
+ case Qt::Key_Favorites:
+ return ui::DomKey::BROWSER_FAVORITES;
+ case Qt::Key_Forward:
+ return ui::DomKey::BROWSER_FORWARD;
+ case Qt::Key_HomePage:
+ return ui::DomKey::BROWSER_HOME;
+ case Qt::Key_Refresh:
+ return ui::DomKey::BROWSER_REFRESH;
+ case Qt::Key_Search:
+ return ui::DomKey::BROWSER_SEARCH;
+ case Qt::Key_Stop:
+ return ui::DomKey::BROWSER_STOP;
+
+ // Mobile Phone Keys
+ case Qt::Key_Call:
+ return ui::DomKey::CALL;
+ case Qt::Key_Camera:
+ return ui::DomKey::CAMERA;
+ case Qt::Key_CameraFocus:
+ return ui::DomKey::CAMERA_FOCUS;
+ case Qt::Key_Hangup:
+ return ui::DomKey::END_CALL;
+ case Qt::Key_LastNumberRedial:
+ return ui::DomKey::LAST_NUMBER_REDIAL;
+ case Qt::Key_VoiceDial:
+ return ui::DomKey::VOICE_DIAL;
+
+ // Media Controller Keys
+ case Qt::Key_Red:
+ return ui::DomKey::COLOR_F0_RED;
+ case Qt::Key_Green:
+ return ui::DomKey::COLOR_F1_GREEN;
+ case Qt::Key_Yellow:
+ return ui::DomKey::COLOR_F2_YELLOW;
+ case Qt::Key_Blue:
+ return ui::DomKey::COLOR_F3_BLUE;
+ case Qt::Key_BrightnessAdjust:
+ return ui::DomKey::DIMMER;
+ case Qt::Key_Display:
+ return ui::DomKey::DISPLAY_SWAP;
+ case Qt::Key_Exit:
+ return ui::DomKey::EXIT;
+ case Qt::Key_Guide:
+ return ui::DomKey::GUIDE;
+ case Qt::Key_Info:
+ return ui::DomKey::INFO;
+ case Qt::Key_MediaLast:
+ return ui::DomKey::MEDIA_LAST;
+ case Qt::Key_TopMenu:
+ return ui::DomKey::MEDIA_TOP_MENU;
+ case Qt::Key_AudioRandomPlay:
+ return ui::DomKey::RANDOM_TOGGLE;
+ case Qt::Key_Settings:
+ return ui::DomKey::SETTINGS;
+ case Qt::Key_SplitScreen:
+ return ui::DomKey::SPLIT_SCREEN_TOGGLE;
+ case Qt::Key_Subtitle:
+ return ui::DomKey::SUBTITLE;
+ case Qt::Key_Zoom:
+ return ui::DomKey::ZOOM_TOGGLE;
+
+ default:
+ return ui::DomKey::NONE;
+ }
+}
+
static inline double currentTimeForEvent(const QInputEvent* event)
{
Q_ASSERT(event);
@@ -699,6 +1248,13 @@ content::NativeWebKeyboardEvent WebEventFactory::toWebKeyboardEvent(QKeyEvent *e
webKitEvent.nativeKeyCode = ev->nativeVirtualKey();
webKitEvent.windowsKeyCode = windowsKeyCodeForKeyEvent(ev->key(), ev->modifiers() & Qt::KeypadModifier);
webKitEvent.setKeyIdentifierFromWindowsKeyCode();
+ webKitEvent.domKey = getDomKeyFromQKeyEvent(ev);
+
+ ui::DomCode domCode = ui::DomCode::NONE;
+ int scanCode = ev->nativeScanCode();
+ if (scanCode)
+ domCode = ui::KeycodeConverter::NativeKeycodeToDomCode(scanCode);
+ webKitEvent.domCode = static_cast<int>(domCode);
const ushort* text = ev->text().utf16();
memcpy(&webKitEvent.text, text, std::min(sizeof(webKitEvent.text), size_t(ev->text().length() * 2)));
diff --git a/src/core/yuv_video_node.cpp b/src/core/yuv_video_node.cpp
index f8290878b..16e52575d 100644
--- a/src/core/yuv_video_node.cpp
+++ b/src/core/yuv_video_node.cpp
@@ -283,8 +283,19 @@ void YUVVideoMaterialShader::updateState(const RenderState &state, QSGMaterial *
break;
}
- program()->setUniformValue(m_id_yuvMatrix, QMatrix3x3(yuv_to_rgb));
- program()->setUniformValue(m_id_yuvAdjust, QVector3D(yuv_adjust[0], yuv_adjust[1], yuv_adjust[2]));
+ float yuv_to_rgb_multiplied[9];
+ float yuv_adjust_with_offset[3];
+
+ for (int i = 0; i < 9; ++i)
+ yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * mat->m_resourceMultiplier;
+
+ for (int i = 0; i < 3; ++i)
+ yuv_adjust_with_offset[i] =
+ yuv_adjust[i] / mat->m_resourceMultiplier - mat->m_resourceOffset;
+
+
+ program()->setUniformValue(m_id_yuvMatrix, QMatrix3x3(yuv_to_rgb_multiplied));
+ program()->setUniformValue(m_id_yuvAdjust, QVector3D(yuv_adjust_with_offset[0], yuv_adjust_with_offset[1], yuv_adjust_with_offset[2]));
if (state.isOpacityDirty())
program()->setUniformValue(m_id_opacity, state.opacity());
@@ -312,7 +323,8 @@ void YUVAVideoMaterialShader::updateState(const RenderState &state, QSGMaterial
YUVVideoMaterial::YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
+ YUVVideoMaterial::ColorSpace colorspace,
+ float rMul, float rOff)
: m_yTexture(yTexture)
, m_uTexture(uTexture)
, m_vTexture(vTexture)
@@ -321,6 +333,8 @@ YUVVideoMaterial::YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, Q
, m_yaTexSize(yaTexSize)
, m_uvTexSize(uvTexSize)
, m_colorSpace(colorspace)
+ , m_resourceMultiplier(rMul)
+ , m_resourceOffset(rOff)
{
}
@@ -341,8 +355,9 @@ int YUVVideoMaterial::compare(const QSGMaterial *other) const
YUVAVideoMaterial::YUVAVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
- : YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace)
+ YUVVideoMaterial::ColorSpace colorspace,
+ float rMul, float rOff)
+ : YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff)
, m_aTexture(aTexture)
{
setFlag(Blending, aTexture);
@@ -363,15 +378,15 @@ int YUVAVideoMaterial::compare(const QSGMaterial *other) const
YUVVideoNode::YUVVideoNode(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
+ YUVVideoMaterial::ColorSpace colorspace, float rMul, float rOff)
: m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4)
{
setGeometry(&m_geometry);
setFlag(QSGNode::OwnsMaterial);
if (aTexture)
- m_material = new YUVAVideoMaterial(yTexture, uTexture, vTexture, aTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace);
+ m_material = new YUVAVideoMaterial(yTexture, uTexture, vTexture, aTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff);
else
- m_material = new YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace);
+ m_material = new YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff);
setMaterial(m_material);
}
diff --git a/src/core/yuv_video_node.h b/src/core/yuv_video_node.h
index cce204fd3..670ec62b6 100644
--- a/src/core/yuv_video_node.h
+++ b/src/core/yuv_video_node.h
@@ -60,7 +60,7 @@ public:
};
YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- ColorSpace colorspace);
+ ColorSpace colorspace, float rMul, float rOff);
virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
{
@@ -79,7 +79,8 @@ public:
QSizeF m_yaTexSize;
QSizeF m_uvTexSize;
ColorSpace m_colorSpace;
-
+ float m_resourceMultiplier;
+ float m_resourceOffset;
};
class YUVAVideoMaterial : public YUVVideoMaterial
@@ -87,7 +88,7 @@ class YUVAVideoMaterial : public YUVVideoMaterial
public:
YUVAVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- ColorSpace colorspace);
+ ColorSpace colorspace, float rMul, float rOff);
virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
{
@@ -106,7 +107,7 @@ class YUVVideoNode : public QSGGeometryNode
public:
YUVVideoNode(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace);
+ YUVVideoMaterial::ColorSpace colorspace, float rMul, float rOff);
void setRect(const QRectF &rect);
private:
diff --git a/src/process/process.pro b/src/process/process.pro
index cd60b1f91..5e2e734f4 100644
--- a/src/process/process.pro
+++ b/src/process/process.pro
@@ -16,9 +16,9 @@ win32 {
load(qt_app)
-contains(QT_CONFIG, build_all): CONFIG += build_all
+qtConfig(build_all): CONFIG += build_all
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
# Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework.
DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/5/Helpers
} else {
@@ -28,7 +28,7 @@ contains(QT_CONFIG, qt_framework) {
}
msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/5/Helpers
} else {
target.path = $$[QT_INSTALL_LIBEXECS]
diff --git a/src/src.pro b/src/src.pro
index 64c1703fe..9b5373181 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -6,20 +6,15 @@ webenginewidgets.depends = core webengine
webengine_plugin.subdir = webengine/plugin
webengine_plugin.target = sub-webengine-plugin
webengine_plugin.depends = webengine
-webengine_experimental_plugin.subdir = webengine/plugin/experimental
-webengine_experimental_plugin.target = sub-webengine-experimental-plugin
-webengine_experimental_plugin.depends = webengine
SUBDIRS += core \
process \
webengine \
webengine_plugin \
- webengine_experimental_plugin \
plugins
# allow only desktop builds of qwebengine_convert_dict
-# osx does not use hunspell
-!contains(WEBENGINE_CONFIG, no_spellcheck):!osx:!cross_compile {
+contains(WEBENGINE_CONFIG, use_spellchecker):!contains(WEBENGINE_CONFIG, use_native_spellchecker):!cross_compile {
SUBDIRS += qwebengine_convert_dict
qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
qwebengine_convert_dict.depends = core
@@ -34,8 +29,10 @@ isQMLTestSupportApiEnabled() {
# FIXME: We probably want a bit more control over config options to tweak what to build/ship or not.
# Another example of where this could be necessary is to make it easy to build proprietery codecs support.
-!contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui
-
+!contains(WEBENGINE_CONFIG, no_ui_delegates) {
+ SUBDIRS += webengine/ui \
+ webengine/ui2
+}
qtHaveModule(widgets) {
SUBDIRS += webenginewidgets
plugins.depends = webenginewidgets
diff --git a/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro b/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
index de125cc76..715081b5f 100644
--- a/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
+++ b/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
@@ -1,15 +1,19 @@
option(host_build)
# Look for linking information produced by gyp for our target according to core_generated.gyp
-!include($$OUT_PWD/../../core/$$getConfigDir()/QtWebEngineCore_linking.pri) {
+!include($$OUT_PWD/../../core/$$getConfigDir()/convert_dict_linking.pri) {
error("Could not find the linking information that gyp should have generated.")
}
-# remove object files from linking information
+
+# skip dummy main.cpp file
OBJECTS =
# Fixme: -Werror=unused-parameter in core
QMAKE_CXXFLAGS_WARN_ON =
+# Disable MSVC2015 warning C4577 ('noexcept' used with no exception handling mode specified)
+win32: QMAKE_CXXFLAGS_WARN_ON = -wd4577
+
# Issue with some template compliation, smb smart should look at it
win32: DEFINES += NOMINMAX
diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp
index 51a942abe..855e61817 100644
--- a/src/webengine/api/qquickwebenginecertificateerror.cpp
+++ b/src/webengine/api/qquickwebenginecertificateerror.cpp
@@ -93,7 +93,9 @@ QQuickWebEngineCertificateError::QQuickWebEngineCertificateError(const QSharedPo
QQuickWebEngineCertificateError::~QQuickWebEngineCertificateError()
{
- rejectCertificate();
+ Q_D(QQuickWebEngineCertificateError);
+ if (!d->answered)
+ rejectCertificate();
}
@@ -195,6 +197,9 @@ QUrl QQuickWebEngineCertificateError::url() const
\value WebEngineCertificateError.CertificateValidityTooLong
The certificate has a validity period that is too long.
(Added in 5.7)
+ \value WebEngineCertificateError.CertificateTransparencyRequired
+ Certificate Transparency was required for this connection, but the server
+ did not provide CT information that complied with the policy. (Added in 5.8)
*/
QQuickWebEngineCertificateError::Error QQuickWebEngineCertificateError::error() const
{
diff --git a/src/webengine/api/qquickwebenginecertificateerror_p.h b/src/webengine/api/qquickwebenginecertificateerror_p.h
index d04dc2c62..27b2efa14 100644
--- a/src/webengine/api/qquickwebenginecertificateerror_p.h
+++ b/src/webengine/api/qquickwebenginecertificateerror_p.h
@@ -84,6 +84,7 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
};
Q_ENUM(Error)
diff --git a/src/webengine/api/qquickwebenginecontextmenudata.cpp b/src/webengine/api/qquickwebenginecontextmenudata.cpp
deleted file mode 100644
index 2cc6eaf4b..000000000
--- a/src/webengine/api/qquickwebenginecontextmenudata.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWebEngine module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickwebenginecontextmenudata_p.h"
-
-#include "web_contents_adapter_client.h"
-
-QT_BEGIN_NAMESPACE
-
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeNone, QQuickWebEngineContextMenuData::MediaTypeNone)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeImage, QQuickWebEngineContextMenuData::MediaTypeImage)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeAudio, QQuickWebEngineContextMenuData::MediaTypeAudio)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeVideo, QQuickWebEngineContextMenuData::MediaTypeVideo)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeCanvas, QQuickWebEngineContextMenuData::MediaTypeCanvas)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeFile, QQuickWebEngineContextMenuData::MediaTypeFile)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypePlugin, QQuickWebEngineContextMenuData::MediaTypePlugin)
-
-/*!
- \qmltype WebEngineContextMenuData
- \instantiates QQuickWebEngineContextMenuData
- \inqmlmodule QtWebEngine
- \since QtWebEngine 1.3
- \brief Provides context data for populating or extending a context menu with actions.
-
-
- WebEngineContextMenuData is returned by WebEngineView::contextMenuData() after a context menu event,
- and contains information about where the context menu event took place. This is also in the context
- in which any context specific WebEngineView::WebAction will be performed.
-*/
-
-QQuickWebEngineContextMenuData::QQuickWebEngineContextMenuData() : d(nullptr)
-{
-}
-
-QQuickWebEngineContextMenuData::~QQuickWebEngineContextMenuData()
-{
- delete d;
-}
-
-/*!
- \qmlproperty bool WebEngineContextMenuData::isValid
-
- Is \c true if the context data is valid; otherwise \c false.
-*/
-bool QQuickWebEngineContextMenuData::isValid() const
-{
- return d;
-}
-
-/*!
- \qmlproperty point WebEngineContextMenuData::position
-
-
- Returns the position of the context, usually the mouse position where the context menu event was triggered.
-*/
-QPoint QQuickWebEngineContextMenuData::position() const
-{
- return d ? d->pos : QPoint();
-}
-
-/*!
- \qmlproperty string WebEngineContextMenuData::linkText
-
- Returns the text of a link if the context is a link.
-*/
-QString QQuickWebEngineContextMenuData::linkText() const
-{
- return d ? d->linkText : QString();
-}
-
-/*!
- \qmlproperty url WebEngineContextMenuData::linkUrl
-
- Returns the URL of a link if the context is a link.
-*/
-QUrl QQuickWebEngineContextMenuData::linkUrl() const
-{
- return d ? d->linkUrl : QUrl();
-}
-
-/*!
- \qmlproperty string WebEngineContextMenuData::selectedText
-
- Returns the selected text of the context.
-*/
-QString QQuickWebEngineContextMenuData::selectedText() const
-{
- return d ? d->selectedText : QString();
-}
-
-/*!
- \qmlproperty url WebEngineContextMenuData::mediaUrl
-
- If the context is a media element, returns the URL of that media.
-*/
-QUrl QQuickWebEngineContextMenuData::mediaUrl() const
-{
- return d ? d->mediaUrl : QUrl();
-}
-
-/*!
- \qmlproperty enumeration WebEngineContextMenuData::mediaType
-
- Returns the type of the media element or \c MediaTypeNone if the context is not a media element.
-
- \value WebEngineContextMenuData.MediaTypeNone
- The context is not a media element.
- \value WebEngineContextMenuData.MediaTypeImage
- The context is an image element
- \value WebEngineContextMenuData.MediaTypeVideo
- The context is a video element
- \value WebEngineContextMenuData.MediaTypeAudio
- The context is an audio element
- \value WebEngineContextMenuData.MediaTypeCanvas
- The context is a canvas element
- \value WebEngineContextMenuData.MediaTypeFile
- The context is a file
- \value WebEngineContextMenuData.MediaTypePlugin
- The context is a plugin
-*/
-
-QQuickWebEngineContextMenuData::MediaType QQuickWebEngineContextMenuData::mediaType() const
-{
- return d ? static_cast<QQuickWebEngineContextMenuData::MediaType>(d->mediaType) : MediaTypeNone;
-}
-
-/*!
- \qmlproperty bool WebEngineContextMenuData::isContentEditable
-
- Returns \c true if the content is editable by the user; otherwise returns \c false.
-*/
-bool QQuickWebEngineContextMenuData::isContentEditable() const
-{
- return d ? d->isEditable : false;
-}
-
-void QQuickWebEngineContextMenuData::update(const QtWebEngineCore::WebEngineContextMenuData &update)
-{
- const QQuickWebEngineContextMenuData old(d);
- d = new QtWebEngineCore::WebEngineContextMenuData(update);
-
- if (isValid() != old.isValid())
- Q_EMIT isValidChanged();
-
- if (position() != old.position())
- Q_EMIT positionChanged();
-
- if (selectedText() != old.selectedText())
- Q_EMIT selectedTextChanged();
-
- if (linkText() != old.linkText())
- Q_EMIT linkTextChanged();
-
- if (linkUrl() != old.linkUrl())
- Q_EMIT linkUrlChanged();
-
- if (mediaUrl() != old.mediaUrl())
- Q_EMIT mediaUrlChanged();
-
- if (mediaType() != old.mediaType())
- Q_EMIT mediaTypeChanged();
-
- if (isContentEditable() != old.isContentEditable())
- Q_EMIT isContentEditableChanged();
-}
-
-QQuickWebEngineContextMenuData::QQuickWebEngineContextMenuData(const QQuickWebEngineContextMenuDataPrivate *p, QObject *parent)
- : QObject(parent)
- , d(p)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginecontextmenurequest.cpp b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
new file mode 100644
index 000000000..df57442a1
--- /dev/null
+++ b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickwebenginecontextmenurequest_p.h"
+#include "web_contents_adapter_client.h"
+
+QT_BEGIN_NAMESPACE
+
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeNone,
+ QQuickWebEngineContextMenuRequest::MediaTypeNone)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeImage,
+ QQuickWebEngineContextMenuRequest::MediaTypeImage)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeAudio,
+ QQuickWebEngineContextMenuRequest::MediaTypeAudio)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeVideo,
+ QQuickWebEngineContextMenuRequest::MediaTypeVideo)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeCanvas,
+ QQuickWebEngineContextMenuRequest::MediaTypeCanvas)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeFile,
+ QQuickWebEngineContextMenuRequest::MediaTypeFile)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypePlugin,
+ QQuickWebEngineContextMenuRequest::MediaTypePlugin)
+
+/*!
+ \qmltype ContextMenuRequest
+ \instantiates QQuickWebEngineContextMenuRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing a context menu.
+
+ A ContextMenuRequest is passed as an argument of the
+ WebEngineView::contextMenuRequested signal. It provides further
+ information about the context of the request. The position of the
+ request origin can be found via the \l x and \l y properties.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default context menu should
+ be displayed.
+
+ The following code uses a custom menu to handle the request:
+
+ \code
+ WebEngineView {
+ id: view
+ // ...
+ onContextMenuRequested: function(request) {
+ request.accepted = true;
+ myMenu.x = request.x;
+ myMenu.y = request.y;
+ myMenu.trigger.connect(view.triggerWebAction);
+ myMenu.popup();
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineContextMenuRequest::QQuickWebEngineContextMenuRequest(
+ const QtWebEngineCore::WebEngineContextMenuData &data, QObject *parent):
+ QObject(parent)
+ , m_data(new QtWebEngineCore::WebEngineContextMenuData(data))
+ , m_accepted(false)
+{
+}
+
+QQuickWebEngineContextMenuRequest::~QQuickWebEngineContextMenuRequest()
+{
+}
+
+/*!
+ \qmlproperty int ContextMenuRequest::x
+ \readonly
+
+ The x coordinate of the user action from where the context
+ menu request originates.
+*/
+
+int QQuickWebEngineContextMenuRequest::x() const
+{
+ return m_data->position().x();
+}
+
+/*!
+ \qmlproperty int ContextMenuRequest::y
+ \readonly
+
+ The y coordinate of the user action from where the context
+ menu request originates.
+*/
+
+int QQuickWebEngineContextMenuRequest::y() const
+{
+ return m_data->position().y();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::selectedText
+ \readonly
+
+ The selected text the context menu was created for.
+*/
+
+QString QQuickWebEngineContextMenuRequest::selectedText() const
+{
+ return m_data->selectedText();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::linkText
+ \readonly
+
+ The text of the link if the context menu was requested for a link.
+*/
+
+QString QQuickWebEngineContextMenuRequest::linkText() const
+{
+ return m_data->linkText();
+}
+
+/*!
+ \qmlproperty url ContextMenuRequest::linkUrl
+ \readonly
+
+ The URL of the link if the selected web page content is a link.
+*/
+
+QUrl QQuickWebEngineContextMenuRequest::linkUrl() const
+{
+ return m_data->linkUrl();
+}
+
+/*!
+ \qmlproperty url ContextMenuRequest::mediaUrl
+ \readonly
+
+ The URL of media if the selected web content is a media element.
+*/
+
+QUrl QQuickWebEngineContextMenuRequest::mediaUrl() const
+{
+ return m_data->mediaUrl();
+}
+
+/*!
+ \qmlproperty enumeration ContextMenuRequest::mediaType
+ \readonly
+
+ The type of the media element or \c MediaTypeNone if
+ the selected web page content is not a media element.
+
+ \value ContextMenuRequest.MediaTypeNone
+ Not a media.
+ \value ContextMenuRequest.MediaTypeImage
+ An image.
+ \value ContextMenuRequest.MediaTypeVideo
+ A video.
+ \value ContextMenuRequest.MediaTypeAudio
+ An audio element.
+ \value ContextMenuRequest.MediaTypeCanvas
+ A canvas.
+ \value ContextMenuRequest.MediaTypeFile
+ A file.
+ \value ContextMenuRequest.MediaTypePlugin
+ A plugin.
+*/
+
+QQuickWebEngineContextMenuRequest::MediaType QQuickWebEngineContextMenuRequest::mediaType() const
+{
+ return static_cast<QQuickWebEngineContextMenuRequest::MediaType>(m_data->mediaType());
+}
+
+/*!
+ \qmlproperty bool ContextMenuRequest::isContentEditable
+ \readonly
+
+ Indicates whether the selected web content is editable.
+*/
+
+bool QQuickWebEngineContextMenuRequest::isContentEditable() const
+{
+ return m_data->isEditable();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::misspelledWord
+ \readonly
+
+ If the context is a word considered misspelled by the spell-checker,
+ returns the misspelled word.
+*/
+
+QString QQuickWebEngineContextMenuRequest::misspelledWord() const
+{
+ return m_data->misspelledWord();
+}
+
+/*!
+ \qmlproperty stringlist ContextMenuRequest::spellCheckerSuggestions
+ \readonly
+
+ If the context is a word considered misspelled by the spell-checker,
+ returns a list of suggested replacements.
+*/
+
+QStringList QQuickWebEngineContextMenuRequest::spellCheckerSuggestions() const
+{
+ return m_data->spellCheckerSuggestions();
+}
+
+/*!
+ \qmlproperty bool ContextMenuRequest::accepted
+
+ Indicates whether the context menu request has been
+ handled by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::contextMenuRequested have been executed,
+ a default context menu will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+
+ \note The default content of the context menu depends on the
+ web element for which the request was actually generated.
+*/
+
+bool QQuickWebEngineContextMenuRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineContextMenuRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginecontextmenudata_p.h b/src/webengine/api/qquickwebenginecontextmenurequest_p.h
index aa081cbe6..3d2de14a2 100644
--- a/src/webengine/api/qquickwebenginecontextmenudata_p.h
+++ b/src/webengine/api/qquickwebenginecontextmenurequest_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QQUICKWEBENGINECONTEXTMENUDATA_P_H
-#define QQUICKWEBENGINECONTEXTMENUDATA_P_H
+#ifndef QQUICKWEBENGINECONTEXTMENUREQUEST_H
+#define QQUICKWEBENGINECONTEXTMENUREQUEST_H
//
// W A R N I N G
@@ -49,30 +49,21 @@
// version without notice, or even be removed.
//
// We mean it.
-//
#include <private/qtwebengineglobal_p.h>
+#include <QtCore/QScopedPointer>
#include <QtCore/QObject>
-#include <QtCore/QPoint>
-#include <QtCore/QString>
#include <QtCore/QUrl>
-#include <QtQuick/QQuickItem>
namespace QtWebEngineCore {
-class WebEngineContextMenuData;
+ class WebEngineContextMenuData;
}
QT_BEGIN_NAMESPACE
-class QQuickWebEngineView;
-class QQuickWebEngineViewPrivate;
-
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineContextMenuData : public QObject {
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineContextMenuRequest: public QObject {
Q_OBJECT
public:
- QQuickWebEngineContextMenuData();
- ~QQuickWebEngineContextMenuData();
-
enum MediaType {
MediaTypeNone,
MediaTypeImage,
@@ -84,49 +75,41 @@ public:
};
Q_ENUM(MediaType)
- Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged)
- Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
- Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged)
- Q_PROPERTY(QString linkText READ linkText NOTIFY linkTextChanged)
- Q_PROPERTY(QUrl linkUrl READ linkUrl NOTIFY linkUrlChanged)
- Q_PROPERTY(QUrl mediaUrl READ mediaUrl NOTIFY mediaUrlChanged)
- Q_PROPERTY(MediaType mediaType READ mediaType NOTIFY mediaTypeChanged)
- Q_PROPERTY(bool isContentEditable READ isContentEditable NOTIFY isContentEditableChanged)
-
- bool isValid() const;
-
- QPoint position() const;
+ Q_PROPERTY(int x READ x CONSTANT FINAL)
+ Q_PROPERTY(int y READ y CONSTANT FINAL)
+ Q_PROPERTY(QString selectedText READ selectedText CONSTANT FINAL)
+ Q_PROPERTY(QString linkText READ linkText CONSTANT FINAL)
+ Q_PROPERTY(QUrl linkUrl READ linkUrl CONSTANT FINAL)
+ Q_PROPERTY(QUrl mediaUrl READ mediaUrl CONSTANT FINAL)
+ Q_PROPERTY(MediaType mediaType READ mediaType CONSTANT FINAL)
+ Q_PROPERTY(bool isContentEditable READ isContentEditable CONSTANT FINAL)
+ Q_PROPERTY(QString misspelledWord READ misspelledWord CONSTANT FINAL)
+ Q_PROPERTY(QStringList spellCheckerSuggestions READ spellCheckerSuggestions CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineContextMenuRequest();
+ int x() const;
+ int y() const;
QString selectedText() const;
QString linkText() const;
QUrl linkUrl() const;
QUrl mediaUrl() const;
MediaType mediaType() const;
bool isContentEditable() const;
-
-Q_SIGNALS:
- void isValidChanged();
- void positionChanged();
- void selectedTextChanged();
- void linkTextChanged();
- void linkUrlChanged();
- void mediaUrlChanged();
- void mediaTypeChanged();
- void isContentEditableChanged();
+ QString misspelledWord() const;
+ QStringList spellCheckerSuggestions() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
private:
- void update(const QtWebEngineCore::WebEngineContextMenuData &update);
-
+ QQuickWebEngineContextMenuRequest(const QtWebEngineCore::WebEngineContextMenuData &data, QObject *parent = nullptr);
+ QScopedPointer<QtWebEngineCore::WebEngineContextMenuData> m_data;
+ bool m_accepted;
friend class QQuickWebEngineView;
friend class QQuickWebEngineViewPrivate;
- Q_DISABLE_COPY(QQuickWebEngineContextMenuData)
- typedef QtWebEngineCore::WebEngineContextMenuData QQuickWebEngineContextMenuDataPrivate;
- QQuickWebEngineContextMenuData(const QQuickWebEngineContextMenuDataPrivate *priv, QObject *parent = 0);
- QQuickWebEngineContextMenuData &operator=(const QQuickWebEngineContextMenuDataPrivate *priv);
- const QQuickWebEngineContextMenuDataPrivate *d;
+ Q_DISABLE_COPY(QQuickWebEngineContextMenuRequest)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(const QQuickWebEngineContextMenuData);
-
-#endif // QQUICKWEBENGINECONTEXTMENUDATA_P_H
+#endif // QQUICKWEBENGINECONTEXTMENUREQUEST_H
diff --git a/src/webengine/api/qquickwebenginedialogrequests.cpp b/src/webengine/api/qquickwebenginedialogrequests.cpp
new file mode 100644
index 000000000..641793e12
--- /dev/null
+++ b/src/webengine/api/qquickwebenginedialogrequests.cpp
@@ -0,0 +1,856 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickwebenginedialogrequests_p.h"
+#include "authentication_dialog_controller.h"
+#include "javascript_dialog_controller.h"
+#include "color_chooser_controller.h"
+#include "file_picker_controller.h"
+#include "web_contents_adapter_client.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QtWebEngineCore;
+
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::AlertDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeAlert)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::ConfirmDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeConfirm)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::PromptDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypePrompt)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::UnloadDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeBeforeUnload)
+
+ASSERT_ENUMS_MATCH(FilePickerController::Open,
+ QQuickWebEngineFileDialogRequest::FileModeOpen)
+ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple,
+ QQuickWebEngineFileDialogRequest::FileModeOpenMultiple)
+ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder,
+ QQuickWebEngineFileDialogRequest::FileModeUploadFolder)
+ASSERT_ENUMS_MATCH(FilePickerController::Save,
+ QQuickWebEngineFileDialogRequest::FileModeSave)
+
+/*!
+ \qmltype AuthenticationDialogRequest
+ \instantiates QQuickWebEngineAuthenticationDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for providing authentication credentials required
+ by proxies or HTTP servers.
+
+ An AuthenticationDialogRequest is passed as an argument of the
+ WebEngineView::authenticationDialogRequested signal. It is generated
+ when basic HTTP or proxy authentication is required. The type
+ of authentication can be checked with the \l type property.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call
+ either \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+ \code
+
+ WebEngineView {
+ // ...
+ onAuthenticationDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+
+ \endcode
+*/
+
+QQuickWebEngineAuthenticationDialogRequest::QQuickWebEngineAuthenticationDialogRequest(
+ QSharedPointer<AuthenticationDialogController> controller,
+ QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_url(controller->url())
+ , m_realm(controller->realm())
+ , m_type(controller->isProxy() ? AuthenticationTypeProxy
+ : AuthenticationTypeHTTP)
+ , m_host(controller->host())
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineAuthenticationDialogRequest::~QQuickWebEngineAuthenticationDialogRequest()
+{
+}
+
+/*!
+ \qmlproperty url AuthenticationDialogRequest::url
+ \readonly
+
+ The URL of the HTTP request for which authentication was requested.
+ In case of proxy authentication, this is a request URL which is proxied
+ via host.
+
+ \sa proxyHost
+*/
+
+QUrl QQuickWebEngineAuthenticationDialogRequest::url() const
+{
+ return m_url;
+}
+
+/*!
+ \qmlproperty string AuthenticationDialogRequest::realm
+ \readonly
+
+ The HTTP authentication realm attribute value of the \c WWW-Authenticate
+ header. Empty if \l type is AuthenticationTypeProxy.
+*/
+
+QString QQuickWebEngineAuthenticationDialogRequest::realm() const
+{
+ return m_realm;
+}
+
+/*!
+ \qmlproperty string AuthenticationDialogRequest::proxyHost
+ \readonly
+
+ The hostname of the authentication proxy.
+ Empty if \l type is AuthenticationTypeHTTP.
+*/
+
+QString QQuickWebEngineAuthenticationDialogRequest::proxyHost() const
+{
+ return m_host;
+}
+
+/*!
+ \qmlproperty enumeration AuthenticationDialogRequest::type
+ \readonly
+
+ The type of the authentication request.
+
+ \value WebEngineAuthenticationDialogRequest.AuthenticationTypeHTTP
+ HTTP authentication.
+ \value WebEngineAuthenticationDialogRequest.AuthenticationTypeProxy
+ Proxy authentication.
+*/
+
+QQuickWebEngineAuthenticationDialogRequest::AuthenticationType
+QQuickWebEngineAuthenticationDialogRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty bool AuthenticationDialogRequest::accepted
+
+ Indicates whether the authentication dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::authenticationDialogRequested have been executed,
+ a default authentication dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineAuthenticationDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineAuthenticationDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void AuthenticationDialogRequest::dialogAccept(string username, string password)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a username and the \a password required for authentication.
+*/
+
+void QQuickWebEngineAuthenticationDialogRequest::dialogAccept(const QString &user,
+ const QString &password)
+{
+ m_accepted = true;
+ QSharedPointer<AuthenticationDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->accept(user,password);
+}
+
+/*!
+ \qmlmethod void AuthenticationDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog and the
+ authentication shall not proceed.
+*/
+
+void QQuickWebEngineAuthenticationDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<AuthenticationDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype JavaScriptDialogRequest
+ \instantiates QQuickWebEngineJavaScriptDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing an alert, a confirmation, or a prompt dialog
+ from within JavaScript to the user.
+
+ A JavaScriptDialogRequest is passed as an argument of the
+ WebEngineView::javaScriptDialogRequested signal. The request is emitted
+ if JavaScript on the page calls HTML5's
+ \l{https://www.w3.org/TR/html5/webappapis.html#simple-dialogs}{Simple Dialogs}
+ API, or in response to HTML5's
+ \l {https://www.w3.org/TR/html5/browsers.html#beforeunloadevent}{BeforeUnloadEvent}.
+ The type of a particular dialog can be checked with the \l type property.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards. The JavaScript call
+ causing the request will be blocked until then.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onJavaScriptDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineJavaScriptDialogRequest::QQuickWebEngineJavaScriptDialogRequest(
+ QSharedPointer<JavaScriptDialogController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_message(controller->message())
+ , m_defaultPrompt(controller->defaultPrompt())
+ , m_title(controller->title())
+ , m_type(static_cast<QQuickWebEngineJavaScriptDialogRequest::DialogType>(controller->type()))
+ , m_securityOrigin(controller->securityOrigin())
+ , m_accepted(false)
+{
+}
+
+QQuickWebEngineJavaScriptDialogRequest::~QQuickWebEngineJavaScriptDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::message
+ \readonly
+
+ The message to be shown to the user.
+*/
+
+QString QQuickWebEngineJavaScriptDialogRequest::message() const
+{
+ return m_message;
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::defaultPrompt
+ \readonly
+
+ The default text if the requested dialog box is of
+ the \l type PromptDialog.
+*/
+
+
+QString QQuickWebEngineJavaScriptDialogRequest::defaultText() const
+{
+ return m_defaultPrompt;
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::title
+ \readonly
+
+ A default title for the dialog.
+*/
+
+QString QQuickWebEngineJavaScriptDialogRequest::title() const
+{
+ return m_title;
+}
+
+/*!
+ \qmlproperty enumeration JavaScriptDialogRequest::type
+ \readonly
+
+ Returns the type of the requested dialog box, see HTML5's
+
+ \l{https://www.w3.org/TR/html5/webappapis.html#simple-dialogs}{Simple Dialogs}.
+
+ \value JavaScriptDialogRequest.DialogTypeAlert
+ A JavaScript alert dialog.
+ \value JavaScriptDialogRequest.DialogTypeConfirm
+ A JavaScript confirmation dialog.
+ \value JavaScriptDialogRequest.DialogTypePrompt
+ A JavaScript prompt dialog.
+ \value JavaScriptDialogRequest.DialogTypeUnload
+ The users should be asked if they want to leave the page.
+*/
+
+QQuickWebEngineJavaScriptDialogRequest::DialogType QQuickWebEngineJavaScriptDialogRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty url JavaScriptDialogRequest::securityOrigin
+ \readonly
+
+ The URL of the security origin.
+*/
+
+QUrl QQuickWebEngineJavaScriptDialogRequest::securityOrigin() const
+{
+ return m_securityOrigin;
+}
+
+/*!
+ \qmlproperty bool JavaScriptDialogRequest::accepted
+
+ Indicates whether the JavaScript dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::javaScriptDialogRequested have been executed,
+ a default dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineJavaScriptDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineJavaScriptDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogAccept()
+
+ This function notifies the engine that the user accepted the dialog.
+*/
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogAccept(string text)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a text in case of a prompt message box.
+*/
+
+void QQuickWebEngineJavaScriptDialogRequest::dialogAccept(const QString& text)
+{
+ m_accepted = true;
+ QSharedPointer<JavaScriptDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller) {
+ controller->textProvided(text);
+ controller->accept();
+ }
+}
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog.
+*/
+
+void QQuickWebEngineJavaScriptDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<JavaScriptDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype ColorDialogRequest
+ \instantiates QQuickWebEngineColorDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for selecting a color by the user.
+
+ A ColorDialogRequest is passed as an argument of the
+ WebEngineView::colorDialogRequested signal. It is generated when
+ a color picker dialog is requested. See
+ \l { https://www.w3.org/TR/html5/forms.html#color-state-(type=color)}
+ {HTML5 Color State}.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onColorDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineColorDialogRequest::QQuickWebEngineColorDialogRequest(
+ QSharedPointer<ColorChooserController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_color(controller->initialColor())
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineColorDialogRequest::~QQuickWebEngineColorDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty color ColorDialogRequest::color
+ \readonly
+
+ The default color to be selected in the dialog.
+*/
+
+QColor QQuickWebEngineColorDialogRequest::color() const
+{
+ return m_color;
+}
+
+/*!
+ \qmlproperty bool ColorDialogRequest::accepted
+
+ Indicates whether the color picker dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::colorDialogRequested have been executed,
+ a default color picker dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineColorDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineColorDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+
+/*!
+ \qmlmethod void ColorDialogRequest::dialogAccept(color color)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a color.
+*/
+
+void QQuickWebEngineColorDialogRequest::dialogAccept(const QColor &color)
+{
+ m_accepted = true;
+ QSharedPointer<ColorChooserController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->accept(color);
+}
+
+/*!
+ \qmlmethod void ColorDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog.
+*/
+
+void QQuickWebEngineColorDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<ColorChooserController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype FileDialogRequest
+ \instantiates QQuickWebEngineFileDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for letting the user choose a (new or existing) file or
+ directory.
+
+ A FileDialogRequest is passed as an argument of the
+ WebEngineView::fileDialogRequested signal. It is generated
+ when the file dialog is requested by the input element.
+ See \l {https://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file)}{File Upload state}.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onFileDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineFileDialogRequest::QQuickWebEngineFileDialogRequest(
+ QSharedPointer<FilePickerController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_filename(controller->defaultFileName())
+ , m_acceptedMimeTypes(controller->acceptedMimeTypes())
+ , m_mode(static_cast<QQuickWebEngineFileDialogRequest::FileMode>(controller->mode()))
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineFileDialogRequest::~QQuickWebEngineFileDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty stringlist FileDialogRequest::acceptedMimeTypes
+ \readonly
+
+ A list of MIME types specified in the input element. The selection
+ should be restricted to only these types of files.
+*/
+
+QStringList QQuickWebEngineFileDialogRequest::acceptedMimeTypes() const
+{
+ return m_acceptedMimeTypes;
+}
+
+/*!
+ \qmlproperty string FileDialogRequest::defaultFileName
+ \readonly
+
+ The default name of the file to be selected in the dialog.
+*/
+
+QString QQuickWebEngineFileDialogRequest::defaultFileName() const
+{
+ return m_filename;
+}
+
+/*!
+ \qmlproperty enumeration FileDialogRequest::mode
+ \readonly
+
+ The mode of the file dialog.
+
+ \value FileDialogRequest.FileModeOpen
+ Allows users to specify a single existing file.
+ \value FileDialogRequest.FileModeOpenMultiple
+ Allows users to specify multiple existing files.
+ \value FileDialogRequest.FileModeUploadFolder
+ Allows users to specify a single existing folder for upload.
+ \value FileDialogRequest.FileModeSave
+ Allows users to specify a non-existing file. If an existing file
+ is selected, the users should be informed that the file is going
+ to be overwritten.
+*/
+
+QQuickWebEngineFileDialogRequest::FileMode QQuickWebEngineFileDialogRequest::mode() const
+{
+ return m_mode;
+}
+
+/*!
+ \qmlproperty bool FileDialogRequest::accepted
+
+ Indicates whether the file picker dialog request has been
+ handled by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::fileDialogRequested have been executed,
+ a default file picker dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineFileDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineFileDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void FileDialogRequest::dialogAccept(stringlist files)
+
+ This function needs to be called when the user accepted the dialog with
+ \a files.
+*/
+
+void QQuickWebEngineFileDialogRequest::dialogAccept(const QStringList &files)
+{
+ m_accepted = true;
+ QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->accepted(files);
+}
+
+/*!
+ \qmlmethod void FileDialogRequest::dialogReject()
+
+ This function needs to be called when the user did not accepted the dialog.
+*/
+
+void QQuickWebEngineFileDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->rejected();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype FormValidationMessageRequest
+ \instantiates QQuickWebEngineFormValidationMessageRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing a HTML5 form validation message to the user.
+
+ A FormValidationMessageRequest is passed as an argument of the
+ WebEngineView::formValidationMessageRequested signal. It is generated when
+ the handling of the validation message is requested.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default message should be displayed.
+
+ The following code uses a custom message to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onFormValidationMessageRequested: function(request) {
+ request.accepted = true;
+ switch (request.type) {
+ case FormValidationMessageRequest.Show:
+ validationMessage.text = request.text;
+ validationMessage.x = request.x;
+ validationMessage.y = request.y
+ validationMessage.visible = true;
+ break;
+ case FormValidationMessageRequest.Move:
+ break;
+ case FormValidationMessageRequest.Hide:
+ validationMessage.visible = false;
+ break;
+ }
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineFormValidationMessageRequest::QQuickWebEngineFormValidationMessageRequest(
+ QQuickWebEngineFormValidationMessageRequest::RequestType type, const QRect& anchor,
+ const QString &mainText, const QString &subText, QObject *parent):
+ QObject(parent)
+ , m_anchor(anchor)
+ , m_mainText(mainText)
+ , m_subText(subText)
+ , m_type(type)
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineFormValidationMessageRequest::~QQuickWebEngineFormValidationMessageRequest()
+{
+
+}
+
+/*!
+ \qmlproperty rectangle FormValidationMessageRequest::anchor
+ \readonly
+
+ An anchor of an element in the viewport for which the form
+ validation message should be displayed.
+*/
+
+QRect QQuickWebEngineFormValidationMessageRequest::anchor() const
+{
+ return m_anchor;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::text
+ \readonly
+
+ The text of the form validation message.
+*/
+
+
+QString QQuickWebEngineFormValidationMessageRequest::text() const
+{
+ return m_mainText;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::subText
+ \readonly
+
+ The subtext of the form validation message.
+*/
+
+
+QString QQuickWebEngineFormValidationMessageRequest::subText() const
+{
+ return m_subText;
+}
+
+/*!
+ \qmlproperty enumeration ValidationMessageRequest::type
+ \readonly
+
+ The type of the form validation message request.
+
+ \value ValidationMessageRequest.Show
+ The form validation message should be shown.
+ \value ValidationMessageRequest.Hide
+ The form validation message should be hidden.
+ \value ValidationMessageRequest.Move
+ The form validation message should be moved.
+*/
+
+QQuickWebEngineFormValidationMessageRequest::RequestType QQuickWebEngineFormValidationMessageRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::accepted
+
+ Indicates whether the form validation request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::validationMessageRequested have been executed,
+ a default file validation message will be shown.
+ To prevent this, set \c {request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineFormValidationMessageRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineFormValidationMessageRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginedialogrequests_p.h b/src/webengine/api/qquickwebenginedialogrequests_p.h
new file mode 100644
index 000000000..d8a0e004c
--- /dev/null
+++ b/src/webengine/api/qquickwebenginedialogrequests_p.h
@@ -0,0 +1,265 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKWEBENGINDIALOGREQUESTS_H
+#define QQUICKWEBENGINDIALOGREQUESTS_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qtwebengineglobal_p.h>
+#include <QtCore/QUrl>
+#include <QtCore/QWeakPointer>
+#include <QtCore/QRect>
+#include <QtGui/QColor>
+
+namespace QtWebEngineCore {
+ class AuthenticationDialogController;
+ class ColorChooserController;
+ class FilePickerController;
+ class JavaScriptDialogController;
+}
+
+QT_BEGIN_NAMESPACE
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineAuthenticationDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum AuthenticationType {
+ AuthenticationTypeHTTP,
+ AuthenticationTypeProxy
+ };
+
+ Q_ENUM(AuthenticationType)
+
+ Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
+ Q_PROPERTY(QString realm READ realm CONSTANT FINAL)
+ Q_PROPERTY(QString proxyHost READ proxyHost CONSTANT FINAL)
+ Q_PROPERTY(AuthenticationType type READ type CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineAuthenticationDialogRequest();
+
+ QUrl url() const;
+ QString realm() const;
+ QString proxyHost() const;
+ AuthenticationType type() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QString &user, const QString &password);
+ void dialogReject();
+
+private:
+ QQuickWebEngineAuthenticationDialogRequest(QSharedPointer<QtWebEngineCore::AuthenticationDialogController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::AuthenticationDialogController> m_controller;
+ QUrl m_url;
+ QString m_realm;
+ AuthenticationType m_type;
+ QString m_host;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineAuthenticationDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineJavaScriptDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum DialogType {
+ DialogTypeAlert,
+ DialogTypeConfirm,
+ DialogTypePrompt,
+ DialogTypeBeforeUnload,
+ };
+ Q_ENUM(DialogType)
+
+ Q_PROPERTY(QString message READ message CONSTANT FINAL)
+ Q_PROPERTY(QString defaultText READ defaultText CONSTANT FINAL)
+ Q_PROPERTY(QString title READ title CONSTANT FINAL)
+ Q_PROPERTY(DialogType type READ type CONSTANT FINAL)
+ Q_PROPERTY(QUrl securityOrigin READ securityOrigin CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineJavaScriptDialogRequest();
+
+ QString message() const;
+ QString defaultText() const;
+ QString title() const;
+ DialogType type() const;
+ QUrl securityOrigin() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QString& text = QString());
+ void dialogReject();
+
+private:
+ QQuickWebEngineJavaScriptDialogRequest(QSharedPointer<QtWebEngineCore::JavaScriptDialogController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::JavaScriptDialogController> m_controller;
+ QString m_message;
+ QString m_defaultPrompt;
+ QString m_title;
+ DialogType m_type;
+ QUrl m_securityOrigin;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineJavaScriptDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineColorDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ Q_PROPERTY(QColor color READ color CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineColorDialogRequest();
+
+ QColor color() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QColor &color);
+ void dialogReject();
+
+private:
+ QQuickWebEngineColorDialogRequest(QSharedPointer<QtWebEngineCore::ColorChooserController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::ColorChooserController> m_controller;
+ QColor m_color;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineColorDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineFileDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum FileMode {
+ FileModeOpen,
+ FileModeOpenMultiple,
+ FileModeUploadFolder,
+ FileModeSave
+ };
+ Q_ENUM(FileMode)
+
+ Q_PROPERTY(QString defaultFileName READ defaultFileName CONSTANT FINAL)
+ Q_PROPERTY(QStringList acceptedMimeTypes READ acceptedMimeTypes CONSTANT FINAL)
+ Q_PROPERTY(FileMode mode READ mode CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineFileDialogRequest();
+
+ QStringList acceptedMimeTypes() const;
+ QString defaultFileName() const;
+ FileMode mode() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QStringList &files);
+ void dialogReject();
+
+private:
+ QQuickWebEngineFileDialogRequest(QSharedPointer<QtWebEngineCore::FilePickerController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::FilePickerController> m_controller;
+ QString m_filename;
+ QStringList m_acceptedMimeTypes;
+ FileMode m_mode;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineFileDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineFormValidationMessageRequest : public QObject {
+ Q_OBJECT
+public:
+ enum RequestType {
+ Show,
+ Hide,
+ Move,
+ };
+ Q_ENUM(RequestType)
+ Q_PROPERTY(QRect anchor READ anchor CONSTANT FINAL)
+ Q_PROPERTY(QString text READ text CONSTANT FINAL)
+ Q_PROPERTY(QString subText READ subText CONSTANT FINAL)
+ Q_PROPERTY(RequestType type READ type CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineFormValidationMessageRequest();
+ QRect anchor() const;
+ QString text() const;
+ QString subText() const;
+ RequestType type() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+private:
+ QQuickWebEngineFormValidationMessageRequest(RequestType type, const QRect &anchor = QRect(),
+ const QString &mainText = QString(),
+ const QString &subText = QString(),
+ QObject *parent = nullptr);
+ QRect m_anchor;
+ QString m_mainText;
+ QString m_subText;
+ RequestType m_type;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKWEBENGINDIALOGREQUESTS_H
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 9f0c747f9..8bf319b85 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -66,6 +66,7 @@ QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWeb
, downloadId(-1)
, downloadState(QQuickWebEngineDownloadItem::DownloadCancelled)
, savePageFormat(QQuickWebEngineDownloadItem::UnknownSaveFormat)
+ , type(QQuickWebEngineDownloadItem::Attachment)
, totalBytes(-1)
, receivedBytes(0)
{
@@ -299,6 +300,32 @@ void QQuickWebEngineDownloadItem::setSavePageFormat(QQuickWebEngineDownloadItem:
}
}
+/*!
+ \qmlproperty enumeration WebEngineDownloadItem::type
+ \readonly
+ \since QtWebEngine 1.4
+
+ Describes the requested download's type.
+
+ \value WebEngineDownloadItem.Attachment The web server's response includes a
+ \c Content-Disposition header with the \c attachment directive. If \c Content-Disposition
+ is present in the reply, the web server is indicating that the client should prompt the
+ user to save the content regardless of the content type.
+ See \l {RFC 2616 section 19.5.1} for details.
+ \value WebEngineDownloadItem.DownloadAttribute The user clicked a link with the \c download
+ attribute. See \l {HTML download attribute} for details.
+ \value WebEngineDownloadItem.UserRequested The user initiated the download, for example by
+ selecting a web action.
+ \value WebEngineDownloadItem.SavePage Saving of the current page was requested (for example by
+ the \l{WebEngineView::WebAction}{WebEngineView.SavePage} web action).
+ */
+
+QQuickWebEngineDownloadItem::DownloadType QQuickWebEngineDownloadItem::type() const
+{
+ Q_D(const QQuickWebEngineDownloadItem);
+ return d->type;
+}
+
QQuickWebEngineDownloadItem::QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h
index 0b01fe6fc..61e019b9e 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p.h
@@ -82,6 +82,14 @@ public:
};
Q_ENUM(SavePageFormat)
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+ Q_ENUM(DownloadType)
+
Q_PROPERTY(quint32 id READ id CONSTANT FINAL)
Q_PROPERTY(DownloadState state READ state NOTIFY stateChanged)
Q_PROPERTY(SavePageFormat savePageFormat READ savePageFormat WRITE setSavePageFormat NOTIFY savePageFormatChanged REVISION 2 FINAL)
@@ -89,6 +97,7 @@ public:
Q_PROPERTY(qint64 receivedBytes READ receivedBytes NOTIFY receivedBytesChanged)
Q_PROPERTY(QString mimeType READ mimeType NOTIFY mimeTypeChanged REVISION 1)
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
+ Q_PROPERTY(DownloadType type READ type NOTIFY typeChanged REVISION 3 FINAL)
Q_INVOKABLE void accept();
Q_INVOKABLE void cancel();
@@ -102,6 +111,7 @@ public:
void setPath(QString path);
SavePageFormat savePageFormat() const;
void setSavePageFormat(SavePageFormat format);
+ DownloadType type() const;
Q_SIGNALS:
void stateChanged();
@@ -110,6 +120,7 @@ Q_SIGNALS:
void totalBytesChanged();
Q_REVISION(1) void mimeTypeChanged();
void pathChanged();
+ Q_REVISION(3) void typeChanged();
private:
QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate*, QObject *parent = 0);
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index bdae54ca4..1789af462 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -73,6 +73,7 @@ public:
quint32 downloadId;
QQuickWebEngineDownloadItem::DownloadState downloadState;
QQuickWebEngineDownloadItem::SavePageFormat savePageFormat;
+ QQuickWebEngineDownloadItem::DownloadType type;
qint64 totalBytes;
qint64 receivedBytes;
QString mimeType;
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index d660f639d..871428f33 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -85,6 +85,10 @@ ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineC
QQuickWebEngineProfile class, which exposes further functionality in C++. This allows Qt Quick
applications to intercept URL requests (QQuickWebEngineProfile::setRequestInterceptor), or
register custom URL schemes (QQuickWebEngineProfile::installUrlSchemeHandler).
+
+ Spellchecking HTML form fields can be enabled per profile by setting the \l spellCheckEnabled
+ property and the current languages used for spellchecking can be set by using the
+ \l spellCheckLanguages property.
*/
/*!
@@ -180,6 +184,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
itemPrivate->downloadPath = info.path;
itemPrivate->savePageFormat = static_cast<QQuickWebEngineDownloadItem::SavePageFormat>(
info.savePageFormat);
+ itemPrivate->type = static_cast<QQuickWebEngineDownloadItem::DownloadType>(info.downloadType);
QQuickWebEngineDownloadItem *download = new QQuickWebEngineDownloadItem(itemPrivate, q);
@@ -613,6 +618,105 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
}
/*!
+ \property QQuickWebEngineProfile::spellCheckLanguages
+ \brief The languages used by the spell checker.
+
+ \since QtWebEngine 1.4
+*/
+
+/*!
+ \qmlproperty list<string> WebEngineProfile::spellCheckLanguages
+
+ This property holds the list of languages used by the spell checker.
+ Each language should match the name of the \c .bdic dictionary.
+ For example, the language \c en-US will load the \c en-US.bdic
+ dictionary file.
+
+ Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
+ first in the local directory and if it is not found, in the Qt
+ installation directory.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
+ how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
+ platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
+ will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
+ subdirectory located inside the application bundle \c Resources directory, and also in the
+ \c Resources directory located inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
+
+ \list
+ \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
+ \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
+ \endlist
+
+ For more information about how to compile \c .bdic dictionaries, see the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+ \since QtWebEngine 1.4
+*/
+void QQuickWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
+{
+ Q_D(QQuickWebEngineProfile);
+ if (languages != d->browserContext()->spellCheckLanguages()) {
+ d->browserContext()->setSpellCheckLanguages(languages);
+ emit spellCheckLanguagesChanged();
+ }
+}
+
+/*!
+ \since 5.8
+
+ Returns the list of languages used by the spell checker.
+*/
+QStringList QQuickWebEngineProfile::spellCheckLanguages() const
+{
+ const Q_D(QQuickWebEngineProfile);
+ return d->browserContext()->spellCheckLanguages();
+}
+
+/*!
+ \property QQuickWebEngineProfile::spellCheckEnabled
+ \brief whether the web engine spell checker is enabled.
+
+ \since QtWebEngine 1.4
+*/
+
+/*!
+ \qmlproperty bool WebEngineProfile::spellCheckEnabled
+
+ This property holds whether the web engine spell checker is enabled.
+
+ \since QtWebEngine 1.4
+*/
+void QQuickWebEngineProfile::setSpellCheckEnabled(bool enable)
+{
+ Q_D(QQuickWebEngineProfile);
+ if (enable != isSpellCheckEnabled()) {
+ d->browserContext()->setSpellCheckEnabled(enable);
+ emit spellCheckEnabledChanged();
+ }
+}
+
+bool QQuickWebEngineProfile::isSpellCheckEnabled() const
+{
+ const Q_D(QQuickWebEngineProfile);
+ return d->browserContext()->isSpellCheckEnabled();
+}
+
+/*!
+
Returns the cookie store for this profile.
*/
QWebEngineCookieStore *QQuickWebEngineProfile::cookieStore() const
diff --git a/src/webengine/api/qquickwebengineprofile.h b/src/webengine/api/qquickwebengineprofile.h
index dc5aa7df8..d0d925930 100644
--- a/src/webengine/api/qquickwebengineprofile.h
+++ b/src/webengine/api/qquickwebengineprofile.h
@@ -71,6 +71,8 @@ class Q_WEBENGINE_EXPORT QQuickWebEngineProfile : public QObject {
Q_PROPERTY(QString httpAcceptLanguage READ httpAcceptLanguage WRITE setHttpAcceptLanguage NOTIFY httpAcceptLanguageChanged FINAL REVISION 1)
Q_PROPERTY(PersistentCookiesPolicy persistentCookiesPolicy READ persistentCookiesPolicy WRITE setPersistentCookiesPolicy NOTIFY persistentCookiesPolicyChanged FINAL)
Q_PROPERTY(int httpCacheMaximumSize READ httpCacheMaximumSize WRITE setHttpCacheMaximumSize NOTIFY httpCacheMaximumSizeChanged FINAL)
+ Q_PROPERTY(QStringList spellCheckLanguages READ spellCheckLanguages WRITE setSpellCheckLanguages NOTIFY spellCheckLanguagesChanged FINAL REVISION 3)
+ Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY spellCheckEnabledChanged FINAL REVISION 3)
public:
QQuickWebEngineProfile(QObject *parent = Q_NULLPTR);
@@ -129,6 +131,11 @@ public:
Q_REVISION(2) Q_INVOKABLE void clearHttpCache();
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
+ void setSpellCheckEnabled(bool enabled);
+ bool isSpellCheckEnabled() const;
+
static QQuickWebEngineProfile *defaultProfile();
Q_SIGNALS:
@@ -141,6 +148,8 @@ Q_SIGNALS:
void persistentCookiesPolicyChanged();
void httpCacheMaximumSizeChanged();
Q_REVISION(1) void httpAcceptLanguageChanged();
+ Q_REVISION(3) void spellCheckLanguagesChanged();
+ Q_REVISION(3) void spellCheckEnabledChanged();
void downloadRequested(QQuickWebEngineDownloadItem *download);
void downloadFinished(QQuickWebEngineDownloadItem *download);
diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp
index 7e08e2fd5..5d5173144 100644
--- a/src/webengine/api/qquickwebenginescript.cpp
+++ b/src/webengine/api/qquickwebenginescript.cpp
@@ -44,7 +44,7 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QTimerEvent>
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
using QtWebEngineCore::UserScript;
@@ -65,7 +65,8 @@ using QtWebEngineCore::UserScript;
not accessible from a different one. The worldId property provides some predefined IDs for this
purpose.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
Use \l{WebEngineView::userScripts}{WebEngineView.userScripts} to access a list of scripts
attached to the web view.
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index b12e59576..09bf2708e 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -304,6 +304,49 @@ bool QQuickWebEngineSettings::touchIconsEnabled() const
}
/*!
+ \qmlproperty bool WebEngineSettings::focusOnNavigationEnabled
+ \since QtWebEngine 1.4
+
+ Focus is given to the view whenever a navigation operation occurs
+ (load, stop, reload, reload and bypass cache, forward, backward, set content, and so on).
+
+ Enabled by default. See \l{WebEngine Recipe Browser} for an example where
+ this property is disabled.
+*/
+bool QQuickWebEngineSettings::focusOnNavigationEnabled() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+}
+
+/*!
+ \qmlproperty bool WebEngineSettings::printElementBackgrounds
+ \since QtWebEngine 1.4
+
+ Turns on printing of CSS backgrounds when printing a web page.
+
+ Enabled by default.
+*/
+bool QQuickWebEngineSettings::printElementBackgrounds() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::PrintElementBackgrounds);
+}
+
+/*!
+ \qmlproperty bool WebEngineSettings::allowRunningInsecureContent
+ \since QtWebEngine 1.4
+
+ By default, HTTPS pages cannot run JavaScript, CSS, plugins or
+ web-sockets from HTTP URLs. This used to be possible and this
+ provides an override to get the old behavior.
+
+ Disabled by default.
+*/
+bool QQuickWebEngineSettings::allowRunningInsecureContent() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::AllowRunningInsecureContent);
+}
+
+/*!
\qmlproperty string WebEngineSettings::defaultTextEncoding
\since QtWebEngine 1.2
@@ -464,6 +507,14 @@ void QQuickWebEngineSettings::setTouchIconsEnabled(bool on)
Q_EMIT touchIconsEnabledChanged();
}
+void QQuickWebEngineSettings::setPrintElementBackgrounds(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::PrintElementBackgrounds);
+ d_ptr->setAttribute(WebEngineSettings::PrintElementBackgrounds, on);
+ if (wasOn != on)
+ Q_EMIT printElementBackgroundsChanged();
+}
+
void QQuickWebEngineSettings::setDefaultTextEncoding(QString encoding)
{
const QString oldDefaultTextEncoding = d_ptr->defaultTextEncoding();
@@ -472,6 +523,23 @@ void QQuickWebEngineSettings::setDefaultTextEncoding(QString encoding)
Q_EMIT defaultTextEncodingChanged();
}
+void QQuickWebEngineSettings::setFocusOnNavigationEnabled(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+ d_ptr->setAttribute(WebEngineSettings::FocusOnNavigationEnabled, on);
+ if (wasOn != on)
+ Q_EMIT focusOnNavigationEnabledChanged();
+}
+
+
+void QQuickWebEngineSettings::setAllowRunningInsecureContent(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::AllowRunningInsecureContent);
+ d_ptr->setAttribute(WebEngineSettings::AllowRunningInsecureContent, on);
+ if (wasOn != on)
+ Q_EMIT allowRunningInsecureContentChanged();
+}
+
void QQuickWebEngineSettings::setParentSettings(QQuickWebEngineSettings *parentSettings)
{
d_ptr->setParentSettings(parentSettings->d_ptr.data());
diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h
index 584027260..a53c7cdb3 100644
--- a/src/webengine/api/qquickwebenginesettings_p.h
+++ b/src/webengine/api/qquickwebenginesettings_p.h
@@ -82,6 +82,9 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineSettings : public QObject {
Q_PROPERTY(bool accelerated2dCanvasEnabled READ accelerated2dCanvasEnabled WRITE setAccelerated2dCanvasEnabled NOTIFY accelerated2dCanvasEnabledChanged REVISION 2)
Q_PROPERTY(bool autoLoadIconsForPage READ autoLoadIconsForPage WRITE setAutoLoadIconsForPage NOTIFY autoLoadIconsForPageChanged REVISION 2)
Q_PROPERTY(bool touchIconsEnabled READ touchIconsEnabled WRITE setTouchIconsEnabled NOTIFY touchIconsEnabledChanged REVISION 2)
+ Q_PROPERTY(bool focusOnNavigationEnabled READ focusOnNavigationEnabled WRITE setFocusOnNavigationEnabled NOTIFY focusOnNavigationEnabledChanged REVISION 3)
+ Q_PROPERTY(bool printElementBackgrounds READ printElementBackgrounds WRITE setPrintElementBackgrounds NOTIFY printElementBackgroundsChanged REVISION 3)
+ Q_PROPERTY(bool allowRunningInsecureContent READ allowRunningInsecureContent WRITE setAllowRunningInsecureContent NOTIFY allowRunningInsecureContentChanged REVISION 3)
public:
~QQuickWebEngineSettings();
@@ -105,6 +108,9 @@ public:
bool accelerated2dCanvasEnabled() const;
bool autoLoadIconsForPage() const;
bool touchIconsEnabled() const;
+ bool focusOnNavigationEnabled() const;
+ bool printElementBackgrounds() const;
+ bool allowRunningInsecureContent() const;
void setAutoLoadImages(bool on);
void setJavascriptEnabled(bool on);
@@ -125,6 +131,9 @@ public:
void setAccelerated2dCanvasEnabled(bool on);
void setAutoLoadIconsForPage(bool on);
void setTouchIconsEnabled(bool on);
+ void setFocusOnNavigationEnabled(bool on);
+ void setPrintElementBackgrounds(bool on);
+ void setAllowRunningInsecureContent(bool on);
signals:
void autoLoadImagesChanged();
@@ -146,6 +155,9 @@ signals:
Q_REVISION(2) void accelerated2dCanvasEnabledChanged();
Q_REVISION(2) void autoLoadIconsForPageChanged();
Q_REVISION(2) void touchIconsEnabledChanged();
+ Q_REVISION(3) void focusOnNavigationEnabledChanged();
+ Q_REVISION(3) void printElementBackgroundsChanged();
+ Q_REVISION(3) void allowRunningInsecureContentChanged();
private:
explicit QQuickWebEngineSettings(QQuickWebEngineSettings *parentSettings = 0);
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 31a258b0c..6ca9954cf 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -47,6 +47,8 @@
#include "javascript_dialog_controller.h"
#include "qquickwebenginehistory_p.h"
#include "qquickwebenginecertificateerror_p.h"
+#include "qquickwebenginecontextmenurequest_p.h"
+#include "qquickwebenginedialogrequests_p.h"
#include "qquickwebenginefaviconprovider_p_p.h"
#include "qquickwebengineloadrequest_p.h"
#include "qquickwebenginenavigationrequest_p.h"
@@ -61,8 +63,8 @@
#include "render_widget_host_view_qt_delegate_quick.h"
#include "render_widget_host_view_qt_delegate_quickwindow.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "ui_delegates_manager.h"
-#include "user_resource_controller_host.h"
#include "web_contents_adapter.h"
#include "web_engine_error.h"
#include "web_engine_settings.h"
@@ -125,8 +127,6 @@ static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *obje
QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
: adapter(0)
- , e(new QQuickWebEngineViewExperimental(this))
- , v(new QQuickWebEngineViewport(this))
, m_history(new QQuickWebEngineHistory(this))
, m_profile(QQuickWebEngineProfile::defaultProfile())
, m_settings(new QQuickWebEngineSettings(m_profile->settings()))
@@ -145,27 +145,28 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
, m_dpiScale(1.0)
, m_backgroundColor(Qt::white)
, m_defaultZoomFactor(1.0)
- // QTBUG-53467
- , m_menuEnabled(true)
-{
- // The gold standard for mobile web content is 160 dpi, and the devicePixelRatio expected
- // is the (possibly quantized) ratio of device dpi to 160 dpi.
- // However GUI toolkits on non-iOS platforms may be using different criteria than relative
- // DPI (depending on the history of that platform), dictating the choice of
- // QScreen::devicePixelRatio().
- // Where applicable (i.e. non-iOS mobile platforms), override QScreen::devicePixelRatio
- // and instead use a reasonable default value for viewport.devicePixelRatio to avoid every
- // app having to use this experimental API.
+ , m_ui2Enabled(false)
+{
QString platform = qApp->platformName().toLower();
- if (platform == QLatin1String("qnx")) {
- qreal webPixelRatio = QGuiApplication::primaryScreen()->physicalDotsPerInch() / 160;
-
- // Quantize devicePixelRatio to increments of 1 to allow JS and media queries to select
- // 1x, 2x, 3x etc assets that fit an integral number of pixels.
- setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
- }
if (platform == QLatin1Literal("eglfs"))
- m_menuEnabled = false;
+ m_ui2Enabled = true;
+
+ const QByteArray dialogSet = qgetenv("QTWEBENGINE_DIALOG_SET");
+
+ if (!dialogSet.isEmpty()) {
+ if (dialogSet == QByteArrayLiteral("QtQuickControls2")) {
+ m_ui2Enabled = true;
+ } else if (dialogSet == QByteArrayLiteral("QtQuickControls1")
+ && m_ui2Enabled) {
+ m_ui2Enabled = false;
+ qWarning("QTWEBENGINE_DIALOG_SET=QtQuickControls1 forces use of Qt Quick Controls 1 "
+ "on an eglfs backend. This can crash your application!");
+ } else {
+ qWarning("Ignoring QTWEBENGINE_DIALOG_SET environment variable set to %s. Accepted "
+ "values are \"QtQuickControls1\" and \"QtQuickControls2\"", dialogSet.data());
+ }
+ }
+
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installFactory(&webAccessibleFactory);
#endif // QT_NO_ACCESSIBILITY
@@ -175,21 +176,11 @@ QQuickWebEngineViewPrivate::~QQuickWebEngineViewPrivate()
{
}
-QQuickWebEngineViewExperimental *QQuickWebEngineViewPrivate::experimental() const
-{
- return e.data();
-}
-
-QQuickWebEngineViewport *QQuickWebEngineViewPrivate::viewport() const
-{
- return v.data();
-}
-
UIDelegatesManager *QQuickWebEngineViewPrivate::ui()
{
Q_Q(QQuickWebEngineView);
if (m_uIDelegatesManager.isNull())
- m_uIDelegatesManager.reset(new UIDelegatesManager(q));
+ m_uIDelegatesManager.reset(m_ui2Enabled ? new UI2DelegatesManager(q) : new UIDelegatesManager(q));
return m_uIDelegatesManager.data();
}
@@ -216,31 +207,41 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
{
Q_Q(QQuickWebEngineView);
- if (!m_menuEnabled) {
- qWarning("You are trying to open context menu on eglfs backend, which is not currently supported\n"
- "See QTBUG-53467.");
- return false;
- }
+ m_contextMenuData = data;
+
+ QQuickWebEngineContextMenuRequest *request = new QQuickWebEngineContextMenuRequest(data);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->contextMenuRequested(request);
+
+ if (request->isAccepted())
+ return true;
// Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated
// on OSX.
- QObject *menu = ui()->addMenu(q, QString(), data.pos);
+ QObject *menu = ui()->addMenu(q, QString(), data.position());
if (!menu)
return false;
- contextMenuData.update(data);
- Q_EMIT q->experimental()->contextMenuDataChanged();
-
// Populate our menu
MenuItemHandler *item = 0;
-
- if (!data.linkText.isEmpty() && data.linkUrl.isValid()) {
+ if (data.isEditable() && !data.spellCheckerSuggestions().isEmpty()) {
+ const QPointer<QQuickWebEngineView> qRef(q);
+ for (int i=0; i < data.spellCheckerSuggestions().count() && i < 4; i++) {
+ item = new MenuItemHandler(menu);
+ QString replacement = data.spellCheckerSuggestions().at(i);
+ QObject::connect(item, &MenuItemHandler::triggered, [qRef, replacement] { qRef->replaceMisspelledWord(replacement); });
+ ui()->addMenuItem(item, replacement);
+ }
+ ui()->addMenuSeparator(menu);
+ }
+ if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::OpenLinkInThisWindow); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Follow Link"));
}
- if (data.selectedText.isEmpty()) {
+ if (data.selectedText().isEmpty()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, q, &QQuickWebEngineView::goBack);
ui()->addMenuItem(item, QQuickWebEngineView::tr("Back"), QStringLiteral("go-previous"), q->canGoBack());
@@ -252,6 +253,10 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, q, &QQuickWebEngineView::reload);
ui()->addMenuItem(item, QQuickWebEngineView::tr("Reload"), QStringLiteral("view-refresh"));
+
+ item = new MenuItemHandler(menu);
+ QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ViewSource); });
+ ui()->addMenuItem(item, QQuickWebEngineView::tr("View Page Source"), QStringLiteral("view-source"), adapter->canViewSource());
} else {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::Copy); });
@@ -261,7 +266,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
ui()->addMenuItem(item, QQuickWebEngineView::tr("Unselect"));
}
- if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
+ if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyLinkToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Link URL"));
@@ -269,9 +274,9 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::DownloadLinkToDisk); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Save Link"));
}
- if (contextMenuData.mediaUrl().isValid()) {
- switch (contextMenuData.mediaType()) {
- case QQuickWebEngineContextMenuData::MediaTypeImage:
+ if (data.mediaUrl().isValid()) {
+ switch (data.mediaType()) {
+ case WebEngineContextMenuData::MediaTypeImage:
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyImageUrlToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Image URL"));
@@ -282,11 +287,11 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::DownloadImageToDisk); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Save Image"));
break;
- case QQuickWebEngineContextMenuData::MediaTypeCanvas:
+ case WebEngineContextMenuData::MediaTypeCanvas:
Q_UNREACHABLE(); // mediaUrl is invalid for canvases
break;
- case QQuickWebEngineContextMenuData::MediaTypeAudio:
- case QQuickWebEngineContextMenuData::MediaTypeVideo:
+ case WebEngineContextMenuData::MediaTypeAudio:
+ case WebEngineContextMenuData::MediaTypeVideo:
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyMediaUrlToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Media URL"));
@@ -299,12 +304,12 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaLoop); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Looping"));
- if (data.mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
+ if (data.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaMute); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Mute"));
}
- if (data.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
+ if (data.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaControls); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Media Controls"));
@@ -313,7 +318,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
default:
break;
}
- } else if (contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeCanvas) {
+ } else if (data.mediaType() == WebEngineContextMenuData::MediaTypeCanvas) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyImageToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Image"));
@@ -341,7 +346,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
}
// Now fire the popup() method on the top level menu
- QMetaObject::invokeMethod(menu, "popup");
+ ui()->showMenu(menu);
return true;
}
@@ -356,7 +361,13 @@ void QQuickWebEngineViewPrivate::navigationRequested(int navigationType, const Q
void QQuickWebEngineViewPrivate::javascriptDialog(QSharedPointer<JavaScriptDialogController> dialog)
{
- ui()->showDialog(dialog);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineJavaScriptDialogRequest *request = new QQuickWebEngineJavaScriptDialogRequest(dialog);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->javaScriptDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showDialog(dialog);
}
void QQuickWebEngineViewPrivate::allowCertificateError(const QSharedPointer<CertificateErrorController> &errorController)
@@ -381,12 +392,24 @@ void QQuickWebEngineViewPrivate::runGeolocationPermissionRequest(const QUrl &url
void QQuickWebEngineViewPrivate::showColorDialog(QSharedPointer<ColorChooserController> controller)
{
- ui()->showColorDialog(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineColorDialogRequest *request = new QQuickWebEngineColorDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->colorDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showColorDialog(controller);
}
-void QQuickWebEngineViewPrivate::runFileChooser(FilePickerController* controller)
+void QQuickWebEngineViewPrivate::runFileChooser(QSharedPointer<FilePickerController> controller)
{
- ui()->showFilePicker(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFileDialogRequest *request = new QQuickWebEngineFileDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->fileDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showFilePicker(controller);
}
void QQuickWebEngineViewPrivate::passOnFocus(bool reverse)
@@ -654,7 +677,13 @@ void QQuickWebEngineViewPrivate::javaScriptConsoleMessage(JavaScriptConsoleMessa
void QQuickWebEngineViewPrivate::authenticationRequired(QSharedPointer<AuthenticationDialogController> controller)
{
- ui()->showDialog(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineAuthenticationDialogRequest *request = new QQuickWebEngineAuthenticationDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->authenticationDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showDialog(controller);
}
void QQuickWebEngineViewPrivate::runMediaAccessPermissionRequest(const QUrl &securityOrigin, WebContentsAdapterClient::MediaRequestFlags requestFlags)
@@ -836,7 +865,7 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
, d_ptr(new QQuickWebEngineViewPrivate)
{
Q_D(QQuickWebEngineView);
- d->e->q_ptr = d->q_ptr = this;
+ d->q_ptr = this;
this->setActiveFocusOnTab(true);
this->setFlags(QQuickItem::ItemIsFocusScope | QQuickItem::ItemAcceptsInputMethod
| QQuickItem::ItemAcceptsDrops);
@@ -1078,18 +1107,40 @@ void QQuickWebEngineViewPrivate::showValidationMessage(const QRect &anchor, cons
if (m_testSupport)
Q_EMIT m_testSupport->validationMessageShown(mainText, subText);
#endif
-
- ui()->showMessageBubble(anchor, mainText, subText);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Show,
+ anchor,mainText,subText);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->showMessageBubble(anchor, mainText, subText);
}
void QQuickWebEngineViewPrivate::hideValidationMessage()
{
- ui()->hideMessageBubble();
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Hide);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->hideMessageBubble();
}
void QQuickWebEngineViewPrivate::moveValidationMessage(const QRect &anchor)
{
- ui()->moveMessageBubble(anchor);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Move,
+ anchor);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->moveMessageBubble(anchor);
}
void QQuickWebEngineViewPrivate::updateScrollPosition(const QPointF &position)
@@ -1125,6 +1176,11 @@ bool QQuickWebEngineViewPrivate::isEnabled() const
return q->isEnabled();
}
+void QQuickWebEngineViewPrivate::setToolTip(const QString &toolTipText)
+{
+ ui()->showToolTip(toolTipText);
+}
+
bool QQuickWebEngineView::isLoading() const
{
Q_D(const QQuickWebEngineView);
@@ -1184,12 +1240,6 @@ void QQuickWebEngineView::runJavaScript(const QString &script, quint32 worldId,
d->adapter->runJavaScript(script, worldId);
}
-QQuickWebEngineViewExperimental *QQuickWebEngineView::experimental() const
-{
- Q_D(const QQuickWebEngineView);
- return d->e.data();
-}
-
qreal QQuickWebEngineView::zoomFactor() const
{
Q_D(const QQuickWebEngineView);
@@ -1274,23 +1324,16 @@ void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId
d->m_callbacks.insert(requestId, callback);
}
-bool QQuickWebEngineView::isFullScreen() const
-{
- Q_D(const QQuickWebEngineView);
- return d->m_fullscreenMode;
-}
-
-void QQuickWebEngineViewExperimental::setExtraContextMenuEntriesComponent(QQmlComponent *contextMenuExtras)
+void QQuickWebEngineView::replaceMisspelledWord(const QString &replacement)
{
- if (d_ptr->contextMenuExtraItems == contextMenuExtras)
- return;
- d_ptr->contextMenuExtraItems = contextMenuExtras;
- emit extraContextMenuEntriesComponentChanged();
+ Q_D(QQuickWebEngineView);
+ d->adapter->replaceMisspelling(replacement);
}
-QQmlComponent *QQuickWebEngineViewExperimental::extraContextMenuEntriesComponent() const
+bool QQuickWebEngineView::isFullScreen() const
{
- return d_ptr->contextMenuExtraItems;
+ Q_D(const QQuickWebEngineView);
+ return d->m_fullscreenMode;
}
void QQuickWebEngineView::findText(const QString &subString, FindFlags options, const QJSValue &callback)
@@ -1514,118 +1557,118 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
d->adapter->unselect();
break;
case OpenLinkInThisWindow:
- if (d->contextMenuData.linkUrl().isValid())
- setUrl(d->contextMenuData.linkUrl());
+ if (d->m_contextMenuData.linkUrl().isValid())
+ setUrl(d->m_contextMenuData.linkUrl());
break;
case OpenLinkInNewWindow:
- if (d->contextMenuData.linkUrl().isValid()) {
+ if (d->m_contextMenuData.linkUrl().isValid()) {
QQuickWebEngineNewViewRequest request;
- request.m_requestedUrl = d->contextMenuData.linkUrl();
+ request.m_requestedUrl = d->m_contextMenuData.linkUrl();
request.m_isUserInitiated = true;
request.m_destination = NewViewInWindow;
Q_EMIT newViewRequested(&request);
}
break;
case OpenLinkInNewTab:
- if (d->contextMenuData.linkUrl().isValid()) {
+ if (d->m_contextMenuData.linkUrl().isValid()) {
QQuickWebEngineNewViewRequest request;
- request.m_requestedUrl = d->contextMenuData.linkUrl();
+ request.m_requestedUrl = d->m_contextMenuData.linkUrl();
request.m_isUserInitiated = true;
request.m_destination = NewViewInBackgroundTab;
Q_EMIT newViewRequested(&request);
}
break;
case CopyLinkToClipboard:
- if (d->contextMenuData.linkUrl().isValid()) {
- QString urlString = d->contextMenuData.linkUrl().toString(QUrl::FullyEncoded);
- QString title = d->contextMenuData.linkText().toHtmlEscaped();
+ if (d->m_contextMenuData.linkUrl().isValid()) {
+ QString urlString = d->m_contextMenuData.linkUrl().toString(QUrl::FullyEncoded);
+ QString title = d->m_contextMenuData.linkText().toHtmlEscaped();
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<a href=\"") + urlString + QStringLiteral("\">") + title + QStringLiteral("</a>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << d->contextMenuData.linkUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.linkUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadLinkToDisk:
- if (d->contextMenuData.linkUrl().isValid())
- d->adapter->download(d->contextMenuData.linkUrl(), d->contextMenuData.d->suggestedFileName);
+ if (d->m_contextMenuData.linkUrl().isValid())
+ d->adapter->download(d->m_contextMenuData.linkUrl(), d->m_contextMenuData.suggestedFileName());
break;
case CopyImageToClipboard:
- if (d->contextMenuData.d->hasImageContent &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeImage ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeCanvas))
+ if (d->m_contextMenuData.hasImageContent() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeImage ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas))
{
- d->adapter->copyImageAt(d->contextMenuData.position());
+ d->adapter->copyImageAt(d->m_contextMenuData.position());
}
break;
case CopyImageUrlToClipboard:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeImage) {
- QString urlString = d->contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
- QString title = d->contextMenuData.linkText();
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeImage) {
+ QString urlString = d->m_contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString title = d->m_contextMenuData.linkText();
if (!title.isEmpty())
title = QStringLiteral(" alt=\"%1\"").arg(title.toHtmlEscaped());
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<img src=\"") + urlString + QStringLiteral("\"") + title + QStringLiteral("></img>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << d->contextMenuData.mediaUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadImageToDisk:
case DownloadMediaToDisk:
- if (d->contextMenuData.mediaUrl().isValid())
- d->adapter->download(d->contextMenuData.mediaUrl(), d->contextMenuData.d->suggestedFileName);
+ if (d->m_contextMenuData.mediaUrl().isValid())
+ d->adapter->download(d->m_contextMenuData.mediaUrl(), d->m_contextMenuData.suggestedFileName());
break;
case CopyMediaUrlToClipboard:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- QString urlString = d->contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString urlString = d->m_contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
QMimeData *data = new QMimeData();
data->setText(urlString);
- if (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio)
+ if (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio)
data->setHtml(QStringLiteral("<audio src=\"") + urlString + QStringLiteral("\"></audio>"));
else
data->setHtml(QStringLiteral("<video src=\"") + urlString + QStringLiteral("\"></video>"));
- data->setUrls(QList<QUrl>() << d->contextMenuData.mediaUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case ToggleMediaControls:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaControls);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaControls);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
}
break;
case ToggleMediaLoop:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaLoop);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaLoop);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
}
break;
case ToggleMediaPlayPause:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = (d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaPaused);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
+ bool enable = (d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaPaused);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
}
break;
case ToggleMediaMute:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaMuted);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaMuted);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
}
break;
case InspectElement:
- d->adapter->inspectElementAt(d->contextMenuData.position());
+ d->adapter->inspectElementAt(d->m_contextMenuData.position());
break;
case ExitFullScreen:
d->adapter->exitFullScreen();
@@ -1636,17 +1679,14 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
case SavePage:
d->adapter->save();
break;
+ case ViewSource:
+ d->adapter->viewSource();
+ break;
default:
Q_UNREACHABLE();
}
}
-const QQuickWebEngineContextMenuData *QQuickWebEngineViewExperimental::contextMenuData() const
-{
- Q_D(const QQuickWebEngineView);
- return &d->contextMenuData;
-}
-
QSizeF QQuickWebEngineView::contentsSize() const
{
Q_D(const QQuickWebEngineView);
@@ -1731,42 +1771,5 @@ void QQuickWebEngineFullScreenRequest::reject()
m_viewPrivate->setFullScreenMode(!m_toggleOn);
}
-QQuickWebEngineViewExperimental::QQuickWebEngineViewExperimental(QQuickWebEngineViewPrivate *viewPrivate)
- : q_ptr(0)
- , d_ptr(viewPrivate)
-{
-}
-
-QQuickWebEngineViewport *QQuickWebEngineViewExperimental::viewport() const
-{
- Q_D(const QQuickWebEngineView);
- return d->viewport();
-}
-
-QQuickWebEngineViewport::QQuickWebEngineViewport(QQuickWebEngineViewPrivate *viewPrivate)
- : d_ptr(viewPrivate)
-{
-}
-
-qreal QQuickWebEngineViewport::devicePixelRatio() const
-{
- Q_D(const QQuickWebEngineView);
- return d->devicePixelRatio;
-}
-
-void QQuickWebEngineViewport::setDevicePixelRatio(qreal devicePixelRatio)
-{
- Q_D(QQuickWebEngineView);
- // Valid range is [1, inf)
- devicePixelRatio = qMax(qreal(1.0), devicePixelRatio);
- if (d->devicePixelRatio == devicePixelRatio)
- return;
- d->setDevicePixelRatio(devicePixelRatio);
- if (!d->adapter)
- return;
- d->adapter->dpiScaleChanged();
- Q_EMIT devicePixelRatioChanged();
-}
-
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index b9555d2d9..16c4799b5 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -59,16 +59,20 @@
QT_BEGIN_NAMESPACE
class QQmlWebChannel;
+class QQuickWebEngineAuthenticationDialogRequest;
class QQuickWebEngineCertificateError;
-class QQuickWebEngineContextMenuData;
+class QQuickWebEngineColorDialogRequest;
+class QQuickWebEngineContextMenuRequest;
class QQuickWebEngineFaviconProvider;
+class QQuickWebEngineFileDialogRequest;
class QQuickWebEngineHistory;
+class QQuickWebEngineJavaScriptDialogRequest;
class QQuickWebEngineLoadRequest;
class QQuickWebEngineNavigationRequest;
class QQuickWebEngineNewViewRequest;
class QQuickWebEngineProfile;
class QQuickWebEngineSettings;
-class QQuickWebEngineViewExperimental;
+class QQuickWebEngineFormValidationMessageRequest;
class QQuickWebEngineViewPrivate;
#ifdef ENABLE_QML_TESTSUPPORT_API
@@ -94,7 +98,7 @@ private:
const bool m_toggleOn;
};
-#define LATEST_WEBENGINEVIEW_REVISION 3
+#define LATEST_WEBENGINEVIEW_REVISION 4
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_OBJECT
@@ -146,13 +150,11 @@ public:
QSizeF contentsSize() const;
QPointF scrollPosition() const;
- QQuickWebEngineViewExperimental *experimental() const;
-
// must match WebContentsAdapterClient::NavigationRequestAction
enum NavigationRequestAction {
AcceptRequest,
// Make room in the valid range of the enum so
- // we can expose extra actions in experimental.
+ // we can expose extra actions.
IgnoreRequest = 0xFF
};
Q_ENUM(NavigationRequestAction)
@@ -243,6 +245,7 @@ public:
RequestClose,
Unselect,
SavePage,
+ ViewSource,
WebActionCount
};
Q_ENUM(WebAction)
@@ -472,6 +475,8 @@ public Q_SLOTS:
Q_REVISION(2) void triggerWebAction(WebAction action);
Q_REVISION(3) void printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait);
Q_REVISION(3) void printToPdf(const QJSValue &callback, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait);
+ Q_REVISION(4) void replaceMisspelledWord(const QString &replacement);
+
private Q_SLOTS:
void lazyInitialize();
@@ -501,6 +506,12 @@ Q_SIGNALS:
Q_REVISION(3) void audioMutedChanged(bool muted);
Q_REVISION(3) void recentlyAudibleChanged(bool recentlyAudible);
Q_REVISION(3) void webChannelWorldChanged(uint);
+ Q_REVISION(4) void contextMenuRequested(QQuickWebEngineContextMenuRequest *request);
+ Q_REVISION(4) void authenticationDialogRequested(QQuickWebEngineAuthenticationDialogRequest *request);
+ Q_REVISION(4) void javaScriptDialogRequested(QQuickWebEngineJavaScriptDialogRequest *request);
+ Q_REVISION(4) void colorDialogRequested(QQuickWebEngineColorDialogRequest *request);
+ Q_REVISION(4) void fileDialogRequested(QQuickWebEngineFileDialogRequest *request);
+ Q_REVISION(4) void formValidationMessageRequested(QQuickWebEngineFormValidationMessageRequest *request);
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
@@ -514,8 +525,6 @@ private:
Q_DECLARE_PRIVATE(QQuickWebEngineView)
QScopedPointer<QQuickWebEngineViewPrivate> d_ptr;
- friend class QQuickWebEngineViewExperimental;
- friend class QQuickWebEngineViewExperimentalExtension;
friend class QQuickWebEngineNewViewRequest;
friend class QQuickWebEngineFaviconProvider;
#ifndef QT_NO_ACCESSIBILITY
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 769e41a44..b111e92cd 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -52,7 +52,6 @@
//
#include "qquickwebengineview_p.h"
-#include "qquickwebenginecontextmenudata_p.h"
#include "web_contents_adapter_client.h"
#include <QScopedPointer>
@@ -70,6 +69,7 @@ QT_BEGIN_NAMESPACE
class QQuickWebEngineView;
class QQmlComponent;
class QQmlContext;
+class QQuickWebEngineContextMenuRequest;
class QQuickWebEngineSettings;
class QQuickWebEngineFaviconProvider;
@@ -79,49 +79,6 @@ QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event);
class QQuickWebEngineTestSupport;
#endif
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewport : public QObject {
- Q_OBJECT
- Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
-public:
- QQuickWebEngineViewport(QQuickWebEngineViewPrivate *viewPrivate);
-
- qreal devicePixelRatio() const;
- void setDevicePixelRatio(qreal);
-
-Q_SIGNALS:
- void devicePixelRatioChanged();
-
-private:
- QQuickWebEngineViewPrivate *d_ptr;
-
- Q_DECLARE_PRIVATE(QQuickWebEngineView)
-};
-
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewExperimental : public QObject {
- Q_OBJECT
- Q_PROPERTY(QQuickWebEngineViewport *viewport READ viewport)
- Q_PROPERTY(QQmlComponent *extraContextMenuEntriesComponent READ extraContextMenuEntriesComponent WRITE setExtraContextMenuEntriesComponent NOTIFY extraContextMenuEntriesComponentChanged)
- Q_PROPERTY(const QQuickWebEngineContextMenuData *contextMenuData READ contextMenuData NOTIFY contextMenuDataChanged)
-
- QQuickWebEngineViewport *viewport() const;
- void setExtraContextMenuEntriesComponent(QQmlComponent *);
- QQmlComponent *extraContextMenuEntriesComponent() const;
-
- const QQuickWebEngineContextMenuData *contextMenuData() const;
-
-Q_SIGNALS:
- void extraContextMenuEntriesComponentChanged();
- void contextMenuDataChanged();
-
-private:
- QQuickWebEngineViewExperimental(QQuickWebEngineViewPrivate* viewPrivate);
- QQuickWebEngineView *q_ptr;
- QQuickWebEngineViewPrivate *d_ptr;
-
- Q_DECLARE_PRIVATE(QQuickWebEngineView)
- Q_DECLARE_PUBLIC(QQuickWebEngineView)
-};
-
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public QtWebEngineCore::WebContentsAdapterClient
{
public:
@@ -130,8 +87,6 @@ public:
QQuickWebEngineViewPrivate();
~QQuickWebEngineViewPrivate();
- QQuickWebEngineViewExperimental *experimental() const;
- QQuickWebEngineViewport *viewport() const;
QtWebEngineCore::UIDelegatesManager *ui();
virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
@@ -161,13 +116,16 @@ public:
virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
- virtual void runFileChooser(QtWebEngineCore::FilePickerController *controller) Q_DECL_OVERRIDE;
+ virtual void runFileChooser(QSharedPointer<QtWebEngineCore::FilePickerController>) Q_DECL_OVERRIDE;
virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64, const QVariant&) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64, const QString&) Q_DECL_OVERRIDE { }
virtual void didFetchDocumentInnerText(quint64, const QString&) Q_DECL_OVERRIDE { }
virtual void didFindText(quint64, int) Q_DECL_OVERRIDE;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) Q_DECL_OVERRIDE;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ virtual void didPrintPageOnPrinter(quint64, bool) Q_DECL_OVERRIDE { }
+#endif
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE;
virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
virtual void authenticationRequired(QSharedPointer<QtWebEngineCore::AuthenticationDialogController>) Q_DECL_OVERRIDE;
@@ -190,6 +148,7 @@ public:
void startDragging(const content::DropData &dropData, Qt::DropActions allowedActions,
const QPixmap &pixmap, const QPoint &offset) Q_DECL_OVERRIDE;
virtual bool isEnabled() const Q_DECL_OVERRIDE;
+ virtual void setToolTip(const QString &toolTipText) Q_DECL_OVERRIDE;
const QObject *holdingQObject() const Q_DECL_OVERRIDE;
virtual QSharedPointer<QtWebEngineCore::BrowserContextAdapter> browserContextAdapter() Q_DECL_OVERRIDE;
@@ -208,8 +167,6 @@ public:
static void userScripts_clear(QQmlListProperty<QQuickWebEngineScript> *p);
QSharedPointer<QtWebEngineCore::WebContentsAdapter> adapter;
- QScopedPointer<QQuickWebEngineViewExperimental> e;
- QScopedPointer<QQuickWebEngineViewport> v;
QScopedPointer<QQuickWebEngineHistory> m_history;
QQuickWebEngineProfile *m_profile;
QScopedPointer<QQuickWebEngineSettings> m_settings;
@@ -217,7 +174,7 @@ public:
QQuickWebEngineTestSupport *m_testSupport;
#endif
QQmlComponent *contextMenuExtraItems;
- QQuickWebEngineContextMenuData contextMenuData;
+ QtWebEngineCore::WebEngineContextMenuData m_contextMenuData;
QUrl explicitUrl;
QUrl iconUrl;
QQuickWebEngineFaviconProvider *faviconProvider;
@@ -225,6 +182,7 @@ public:
bool m_fullscreenMode;
bool isLoading;
bool m_activeFocusOnPress;
+ bool m_navigationActionTriggered;
qreal devicePixelRatio;
QMap<quint64, QJSValue> m_callbacks;
QList<QSharedPointer<CertificateErrorController> > m_certificateErrorControllers;
@@ -237,8 +195,7 @@ private:
qreal m_dpiScale;
QColor m_backgroundColor;
qreal m_defaultZoomFactor;
- // QTBUG-53467
- bool m_menuEnabled;
+ bool m_ui2Enabled;
};
#ifndef QT_NO_ACCESSIBILITY
@@ -260,7 +217,4 @@ private:
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickWebEngineViewExperimental)
-QML_DECLARE_TYPE(QQuickWebEngineViewport)
-
#endif // QQUICKWEBENGINEVIEW_P_P_H
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index 6fd93dc20..fe83b082f 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -47,6 +47,7 @@ depends += qtcore \
qtqml \
qtquick \
qtquickcontrols \
+ qtquickcontrols2 \
qtdoc \
qtwebchannel \
qtwebview \
@@ -66,6 +67,7 @@ exampledirs += . \
../../core/doc/snippets \
../../webenginewidgets/doc/snippets
+examples.fileextensions += *.aff *.dic
imagedirs += images
diff --git a/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc b/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc
new file mode 100644
index 000000000..248296588
--- /dev/null
+++ b/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QT += webengine
+//! [0]
+
+
+//! [1]
+#include <QtWebEngine>
+//! [1]
diff --git a/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml b/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
index 4d3095af2..e7e6790f2 100644
--- a/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
+++ b/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
@@ -57,8 +57,8 @@ QtObject {
id: windowParent
// Create the initial browsing windows and open the startup page.
Component.onCompleted: {
- var firstWindow = windowComponent.createObject(windowParent)
- firstWindow.webView.loadHtml('<input type="button" value="Click!" onclick="window.open(&quot;http://qt.io&quot;)">')
+ var firstWindow = windowComponent.createObject(windowParent);
+ firstWindow.webView.loadHtml('<input type="button" value="Click!" onclick="window.open(&quot;http://qt.io&quot;)">');
}
property Component windowComponent: Window {
@@ -74,9 +74,9 @@ QtObject {
// Handle the signal. Dynamically create the window and
// use its WebEngineView as the destination of our request.
- onNewViewRequested: {
- var newWindow = windowComponent.createObject(windowParent)
- request.openIn(newWindow.webView)
+ onNewViewRequested: function(request) {
+ var newWindow = windowComponent.createObject(windowParent);
+ request.openIn(newWindow.webView);
}
}
}
diff --git a/src/webengine/doc/src/external-resources.qdoc b/src/webengine/doc/src/external-resources.qdoc
index c4cfe24af..0d9f80c16 100644
--- a/src/webengine/doc/src/external-resources.qdoc
+++ b/src/webengine/doc/src/external-resources.qdoc
@@ -90,6 +90,11 @@
\title Shaka Player
*/
+/*!
+ \externalpage https://sourceforge.net/projects/hunspell/
+ \title Hunspell Project
+*/
+
/*
This prevents autolinking of each occurrence of 'WebEngine'
To link to the WebEngine QML type, use explicit linking:
@@ -101,3 +106,23 @@
\title WebEngine
\internal
*/
+
+/*!
+ \externalpage https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
+ \title RFC 2616 section 19.5.1
+*/
+
+/*!
+ \externalpage https://www.w3.org/TR/html5/links.html#downloading-resources
+ \title HTML download attribute
+*/
+
+/*!
+ \externalpage https://www.iana.org/assignments/uri-schemes/prov/view-source
+ \title view-source URI scheme
+*/
+
+/*!
+ \externalpage https://wiki.greasespot.net/Metadata_Block
+ \title Greasemonkey
+*/
diff --git a/src/webengine/doc/src/qtwebengine-3rdparty.qdoc b/src/webengine/doc/src/qtwebengine-3rdparty.qdoc
deleted file mode 100644
index 756df7bcd..000000000
--- a/src/webengine/doc/src/qtwebengine-3rdparty.qdoc
+++ /dev/null
@@ -1,15371 +0,0 @@
-<!-- Generated by licenses.py; do not edit. -->/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Almost-Native-Graphics-Layer-Engine.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Almost Native Graphics Layer Engine
-
-\l{http://code.google.com/p/angleproject/}{Project Homepage}
-
-\badcode
-// Copyright (C) 2002-2013 The ANGLE Project Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-//
-// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
-// Ltd., nor the names of their contributors may be used to endorse
-// or promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Blackmagic-DeckLink-SDK---Mac.html
-\ingroup qtwebengine-licensing
-\brief BSL (v 1.0)
-\title Blackmagic DeckLink SDK - Mac
-
-\l{http://sw.blackmagicdesign.com/DeckLink/v10.5.2/Blackmagic_DeckLink_SDK_10.5.2.zip?Key-Pair-Id=APKAJTKA3ZJMJRQITVEA&amp;Signature=YRlsDaU0gNjrPNSoPp1IoTBQDavl09RGMnj1exrwAP+jbrNvSX2EuYTqOn2twguM+pQ8W0cqmIl/IHSVnEXJgQB6Eh57x+ba79t9z3fPsD8lb/a6PtK4qlFeqpLK5UBQ9yl18zxtHIZCnBBIeBNoj0G2CxX2Z4IXHVJmZ1KTbECIGaLyj+tBonW+cgIBQ7yw0dQHxGLJD+xzlCrZOXpGRmhJUBs981yLrnfZ7/LirvrHT+8CyzajzEgl9xBB7TFiZUh2DLXf1BvC4NeH0g/OnYRiR7F0VWh/ZiQM/KjCPbn2MajPo5Og0jVjzxYJbIhZf0HhB6ZN0ZI8aaiMMkmHMg==&amp;Expires=1448991563}{Project Homepage}
-
-\badcode
-Extracted from mac/include/DeckLinkAPI.h:
-
-** Copyright (c) 2014 Blackmagic Design
-**
-** Permission is hereby granted, free of charge, to any person or organization
-** obtaining a copy of the software and accompanying documentation covered by
-** this license (the "Software") to use, reproduce, display, distribute,
-** execute, and transmit the Software, and to prepare derivative works of the
-** Software, and to permit third-parties to whom the Software is furnished to
-** do so, all subject to the following:
-**
-** The copyright notices in the Software and this entire statement, including
-** the above license grant, this restriction and the following disclaimer,
-** must be included in all copies of the Software, in whole or in part, and
-** all derivative works of the Software, unless such copies or derivative
-** works are solely in the form of machine-executable object code generated by
-** a source language processor.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-** DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Brotli.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Brotli
-
-\l{https://github.com/google/brotli}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Chrome-Custom-Tabs---Example-and-Usage.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Chrome Custom Tabs - Example and Usage
-
-\l{https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ChromeVox.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title ChromeVox
-
-\l{http://code.google.com/p/google-axs-chrome/}{Project Homepage}
-
-\badcode
-// Copyright 2013 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Chromium-OS-system-API.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Chromium OS system API
-
-\l{http://www.chromium.org/chromium-os}{Project Homepage}
-
-\badcode
-// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Closure-compiler.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Closure compiler
-
-\l{http://github.com/google/closure-compiler}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Cocoa-extension-code-from-Camino.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Cocoa extension code from Camino
-
-\l{http://caminobrowser.org/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Compact-Language-Detection.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Compact Language Detection
-
-\l{http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Crashpad.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Crashpad
-
-\l{https://crashpad.chromium.org/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Darwin.html
-\ingroup qtwebengine-licensing
-\brief Apple Public Source License 2.0
-\title Darwin
-
-\l{http://www.opensource.apple.com/}{Project Homepage}
-
-\badcode
-APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003
-
-Please read this License carefully before downloading this software. By
-downloading or using this software, you are agreeing to be bound by the terms of
-this License. If you do not or cannot agree to the terms of this License,
-please do not download or use the software.
-
-Apple Note: In January 2007, Apple changed its corporate name from "Apple
-Computer, Inc." to "Apple Inc." This change has been reflected below and
-copyright years updated, but no other changes have been made to the APSL 2.0.
-
-1. General; Definitions. This License applies to any program or other work
-which Apple Inc. ("Apple") makes publicly available and which contains a notice
-placed by Apple identifying such program or work as "Original Code" and stating
-that it is subject to the terms of this Apple Public Source License version 2.0
-("License"). As used in this License:
-
-1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the
-grantor of rights, (i) claims of patents that are now or hereafter acquired,
-owned by or assigned to Apple and (ii) that cover subject matter contained in
-the Original Code, but only to the extent necessary to use, reproduce and/or
-distribute the Original Code without infringement; and (b) in the case where You
-are the grantor of rights, (i) claims of patents that are now or hereafter
-acquired, owned by or assigned to You and (ii) that cover subject matter in Your
-Modifications, taken alone or in combination with Original Code.
-
-1.2 "Contributor" means any person or entity that creates or contributes to the
-creation of Modifications.
-
-1.3 "Covered Code" means the Original Code, Modifications, the combination of
-Original Code and any Modifications, and/or any respective portions thereof.
-
-1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make
-Covered Code available, directly or indirectly, to anyone other than You; and/or
-(b) to use Covered Code, alone or as part of a Larger Work, in any way to
-provide a service, including but not limited to delivery of content, through
-electronic communication with a client other than You.
-
-1.5 "Larger Work" means a work which combines Covered Code or portions thereof
-with code not governed by the terms of this License.
-
-1.6 "Modifications" mean any addition to, deletion from, and/or change to, the
-substance and/or structure of the Original Code, any previous Modifications, the
-combination of Original Code and any previous Modifications, and/or any
-respective portions thereof. When code is released as a series of files, a
-Modification is: (a) any addition to or deletion from the contents of a file
-containing Covered Code; and/or (b) any new file or other representation of
-computer program statements that contains any part of Covered Code.
-
-1.7 "Original Code" means (a) the Source Code of a program or other work as
-originally made available by Apple under this License, including the Source Code
-of any updates or upgrades to such programs or works made available by Apple
-under this License, and that has been expressly identified by Apple as such in
-the header file(s) of such work; and (b) the object code compiled from such
-Source Code and originally made available by Apple under this License
-
-1.8 "Source Code" means the human readable form of a program or other work that
-is suitable for making modifications to it, including all modules it contains,
-plus any associated interface definition files, scripts used to control
-compilation and installation of an executable (object code).
-
-1.9 "You" or "Your" means an individual or a legal entity exercising rights
-under this License. For legal entities, "You" or "Your" includes any entity
-which controls, is controlled by, or is under common control with, You, where
-"control" means (a) the power, direct or indirect, to cause the direction or
-management of such entity, whether by contract or otherwise, or (b) ownership of
-fifty percent (50%) or more of the outstanding shares or beneficial ownership of
-such entity.
-
-2. Permitted Uses; Conditions &amp; Restrictions. Subject to the terms and
-conditions of this License, Apple hereby grants You, effective on the date You
-accept this License and download the Original Code, a world-wide, royalty-free,
-non-exclusive license, to the extent of Apple's Applicable Patent Rights and
-copyrights covering the Original Code, to do the following:
-
-2.1 Unmodified Code. You may use, reproduce, display, perform, internally
-distribute within Your organization, and Externally Deploy verbatim, unmodified
-copies of the Original Code, for commercial or non-commercial purposes, provided
-that in each instance:
-
-(a) You must retain and reproduce in all copies of Original Code the copyright
-and other proprietary notices and disclaimers of Apple as they appear in the
-Original Code, and keep intact all notices in the Original Code that refer to
-this License; and
-
-(b) You must include a copy of this License with every copy of Source Code of
-Covered Code and documentation You distribute or Externally Deploy, and You may
-not offer or impose any terms on such Source Code that alter or restrict this
-License or the recipients' rights hereunder, except as permitted under Section
-6.
-
-2.2 Modified Code. You may modify Covered Code and use, reproduce, display,
-perform, internally distribute within Your organization, and Externally Deploy
-Your Modifications and Covered Code, for commercial or non-commercial purposes,
-provided that in each instance You also meet all of these conditions:
-
-(a) You must satisfy all the conditions of Section 2.1 with respect to the
-Source Code of the Covered Code;
-
-(b) You must duplicate, to the extent it does not already exist, the notice in
-Exhibit A in each file of the Source Code of all Your Modifications, and cause
-the modified files to carry prominent notices stating that You changed the files
-and the date of any change; and
-
-(c) If You Externally Deploy Your Modifications, You must make Source Code of
-all Your Externally Deployed Modifications either available to those to whom You
-have Externally Deployed Your Modifications, or publicly available. Source Code
-of Your Externally Deployed Modifications must be released under the terms set
-forth in this License, including the license grants set forth in Section 3
-below, for as long as you Externally Deploy the Covered Code or twelve (12)
-months from the date of initial External Deployment, whichever is longer. You
-should preferably distribute the Source Code of Your Externally Deployed
-Modifications electronically (e.g. download from a web site).
-
-2.3 Distribution of Executable Versions. In addition, if You Externally Deploy
-Covered Code (Original Code and/or Modifications) in object code, executable
-form only, You must include a prominent notice, in the code itself as well as in
-related documentation, stating that Source Code of the Covered Code is available
-under the terms of this License with information on how and where to obtain such
-Source Code.
-
-2.4 Third Party Rights. You expressly acknowledge and agree that although
-Apple and each Contributor grants the licenses to their respective portions of
-the Covered Code set forth herein, no assurances are provided by Apple or any
-Contributor that the Covered Code does not infringe the patent or other
-intellectual property rights of any other entity. Apple and each Contributor
-disclaim any liability to You for claims brought by any other entity based on
-infringement of intellectual property rights or otherwise. As a condition to
-exercising the rights and licenses granted hereunder, You hereby assume sole
-responsibility to secure any other intellectual property rights needed, if any.
-For example, if a third party patent license is required to allow You to
-distribute the Covered Code, it is Your responsibility to acquire that license
-before distributing the Covered Code.
-
-3. Your Grants. In consideration of, and as a condition to, the licenses
-granted to You under this License, You hereby grant to any person or entity
-receiving or distributing Covered Code under this License a non-exclusive,
-royalty-free, perpetual, irrevocable license, under Your Applicable Patent
-Rights and other intellectual property rights (other than patent) owned or
-controlled by You, to use, reproduce, display, perform, modify, sublicense,
-distribute and Externally Deploy Your Modifications of the same scope and extent
-as Apple's licenses under Sections 2.1 and 2.2 above.
-
-4. Larger Works. You may create a Larger Work by combining Covered Code with
-other code not governed by the terms of this License and distribute the Larger
-Work as a single product. In each such instance, You must make sure the
-requirements of this License are fulfilled for the Covered Code or any portion
-thereof.
-
-5. Limitations on Patent License. Except as expressly stated in Section 2, no
-other patent rights, express or implied, are granted by Apple herein.
-Modifications and/or Larger Works may require additional patent licenses from
-Apple which Apple may grant in its sole discretion.
-
-6. Additional Terms. You may choose to offer, and to charge a fee for,
-warranty, support, indemnity or liability obligations and/or other rights
-consistent with the scope of the license granted herein ("Additional Terms") to
-one or more recipients of Covered Code. However, You may do so only on Your own
-behalf and as Your sole responsibility, and not on behalf of Apple or any
-Contributor. You must obtain the recipient's agreement that any such Additional
-Terms are offered by You alone, and You hereby agree to indemnify, defend and
-hold Apple and every Contributor harmless for any liability incurred by or
-claims asserted against Apple or such Contributor by reason of any such
-Additional Terms.
-
-7. Versions of the License. Apple may publish revised and/or new versions of
-this License from time to time. Each version will be given a distinguishing
-version number. Once Original Code has been published under a particular
-version of this License, You may continue to use it under the terms of that
-version. You may also choose to use such Original Code under the terms of any
-subsequent version of this License published by Apple. No one other than Apple
-has the right to modify the terms applicable to Covered Code created under this
-License.
-
-8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part
-pre-release, untested, or not fully tested works. The Covered Code may contain
-errors that could cause failures or loss of data, and may be incomplete or
-contain inaccuracies. You expressly acknowledge and agree that use of the
-Covered Code, or any portion thereof, is at Your sole and entire risk. THE
-COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF
-ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE"
-FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
-ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY
-QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT,
-AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT
-WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
-FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE
-OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT
-DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION
-OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR
-SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended
-for use in the operation of nuclear facilities, aircraft navigation,
-communication systems, or air traffic control machines in which case the failure
-of the Covered Code could lead to death, personal injury, or severe physical or
-environmental damage.
-
-9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT
-SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE
-OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A
-THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR
-OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
-REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
-INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In
-no event shall Apple's total liability to You for all damages (other than as may
-be required by applicable law) under this License exceed the amount of fifty
-dollars ($50.00).
-
-10. Trademarks. This License does not grant any rights to use the trademarks
-or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming
-Server" or any other trademarks, service marks, logos or trade names belonging
-to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or
-trade name belonging to any Contributor. You agree not to use any Apple Marks
-in or as part of the name of products derived from the Original Code or to
-endorse or promote products derived from the Original Code other than as
-expressly permitted by and in strict compliance at all times with Apple's third
-party trademark usage guidelines which are posted at
-http://www.apple.com/legal/guidelinesfor3rdparties.html.
-
-11. Ownership. Subject to the licenses granted under this License, each
-Contributor retains all rights, title and interest in and to any Modifications
-made by such Contributor. Apple retains all rights, title and interest in and
-to the Original Code and any Modifications made by or on behalf of Apple ("Apple
-Modifications"), and such Apple Modifications will not be automatically subject
-to this License. Apple may, at its sole discretion, choose to license such
-Apple Modifications under this License, or on different terms from those
-contained in this License or may choose not to license them at all.
-
-12. Termination.
-
-12.1 Termination. This License and the rights granted hereunder will
-terminate:
-
-(a) automatically without notice from Apple if You fail to comply with any
-term(s) of this License and fail to cure such breach within 30 days of becoming
-aware of such breach; (b) immediately in the event of the circumstances
-described in Section 13.5(b); or (c) automatically without notice from Apple if
-You, at any time during the term of this License, commence an action for patent
-infringement against Apple; provided that Apple did not first commence an action
-for patent infringement against You in that instance.
-
-12.2 Effect of Termination. Upon termination, You agree to immediately stop
-any further use, reproduction, modification, sublicensing and distribution of
-the Covered Code. All sublicenses to the Covered Code which have been properly
-granted prior to termination shall survive any termination of this License.
-Provisions which, by their nature, should remain in effect beyond the
-termination of this License shall survive, including but not limited to Sections
-3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for
-compensation, indemnity or damages of any sort solely as a result of terminating
-this License in accordance with its terms, and termination of this License will
-be without prejudice to any other right or remedy of any party.
-
-13. Miscellaneous.
-
-13.1 Government End Users. The Covered Code is a "commercial item" as defined
-in FAR 2.101. Government software and technical data rights in the Covered Code
-include only those rights customarily provided to the public as defined in this
-License. This customary commercial license in technical data and software is
-provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer
-Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical
-Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software
-or Computer Software Documentation). Accordingly, all U.S. Government End Users
-acquire Covered Code with only those rights set forth herein.
-
-13.2 Relationship of Parties. This License will not be construed as creating
-an agency, partnership, joint venture or any other form of legal association
-between or among You, Apple or any Contributor, and You will not represent to
-the contrary, whether expressly, by implication, appearance or otherwise.
-
-13.3 Independent Development. Nothing in this License will impair Apple's
-right to acquire, license, develop, have others develop for it, market and/or
-distribute technology or products that perform the same or similar functions as,
-or otherwise compete with, Modifications, Larger Works, technology or products
-that You may develop, produce, market or distribute.
-
-13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any
-provision of this License will not be deemed a waiver of future enforcement of
-that or any other provision. Any law or regulation which provides that the
-language of a contract shall be construed against the drafter will not apply to
-this License.
-
-13.5 Severability. (a) If for any reason a court of competent jurisdiction
-finds any provision of this License, or portion thereof, to be unenforceable,
-that provision of the License will be enforced to the maximum extent permissible
-so as to effect the economic benefits and intent of the parties, and the
-remainder of this License will continue in full force and effect. (b)
-Notwithstanding the foregoing, if applicable law prohibits or restricts You from
-fully and/or specifically complying with Sections 2 and/or 3 or prevents the
-enforceability of either of those Sections, this License will immediately
-terminate and You must immediately discontinue any use of the Covered Code and
-destroy all copies of it that are in your possession or control.
-
-13.6 Dispute Resolution. Any litigation or other dispute resolution between
-You and Apple relating to this License shall take place in the Northern District
-of California, and You and Apple hereby consent to the personal jurisdiction of,
-and venue in, the state and federal courts within that District with respect to
-this License. The application of the United Nations Convention on Contracts for
-the International Sale of Goods is expressly excluded.
-
-13.7 Entire Agreement; Governing Law. This License constitutes the entire
-agreement between the parties with respect to the subject matter hereof. This
-License shall be governed by the laws of the United States and the State of
-California, except that body of California law concerning conflicts of law.
-
-Where You are located in the province of Quebec, Canada, the following clause
-applies: The parties hereby confirm that they have requested that this License
-and all related documents be drafted in English. Les parties ont exigé que le
-présent contrat et tous les documents connexes soient rédigés en anglais.
-
-EXHIBIT A.
-
-"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved.
-
-This file contains Original Code and/or Modifications of Original Code as
-defined in and that are subject to the Apple Public Source License Version 2.0
-(the 'License'). You may not use this file except in compliance with the
-License. Please obtain a copy of the License at
-http://www.opensource.apple.com/apsl/ and read it before using this file.
-
-The Original Code and all software distributed under the License are distributed
-on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
-AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION,
-ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
-ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language
-governing rights and limitations under the License."
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-David-M.-Gay's-floating-point-routines.html
-\ingroup qtwebengine-licensing
-\brief MIT-like
-\title David M. Gay's floating point routines
-
-\l{http://www.netlib.org/fp/}{Project Homepage}
-
-\badcode
-/****************************************************************
- *
- * The author of this software is David M. Gay.
- *
- * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose without fee is hereby granted, provided that this entire notice
- * is included in all copies of any software which is or includes a copy
- * or modification of this software and in all copies of the supporting
- * documentation for such software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
- * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- *************************************************************** /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Error-Prone.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Error Prone
-
-\l{http://errorprone.info/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Expat-XML-Parser.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Expat XML Parser
-
-\l{http://sourceforge.net/projects/expat/}{Project Homepage}
-
-\badcode
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- and Clark Cooper
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Flot-Javascript/JQuery-library-for-creating-graphs.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Flot Javascript/JQuery library for creating graphs
-
-\l{http://www.flotcharts.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2007-2013 IOLA and Ole Laursen
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-GifPlayer-Animated-GIF-Library.html
-\ingroup qtwebengine-licensing
-\brief Apache License 2.0
-\title GifPlayer Animated GIF Library
-
-\l{http://android-gifview.googlecode.com/svn/!svn/bc/8/trunk/}{Project Homepage}
-
-\badcode
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Google-Cardboard.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Google Cardboard
-
-\l{https://github.com/googlesamples/cardboard-java/}{Project Homepage}
-
-\badcode
- Copyright (c) 2014, Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Hardware-Composer-Plus.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Hardware Composer Plus
-
-\l{https://chromium.googlesource.com/chromium/src/third_party/hwcplus/}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-IAccessible2-COM-interfaces-for-accessibility.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title IAccessible2 COM interfaces for accessibility
-
-\l{http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2}{Project Homepage}
-
-\badcode
-/*************************************************************************
- *
- * IAccessible2 IDL Specification
- *
- * Copyright (c) 2007, 2010 Linux Foundation
- * Copyright (c) 2006 IBM Corporation
- * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
- * All rights reserved.
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * 3. Neither the name of the Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This BSD License conforms to the Open Source Initiative "Simplified
- * BSD License" as published at:
- * http://www.opensource.org/licenses/bsd-license.php
- *
- * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
- * mark may be used in accordance with the Linux Foundation Trademark
- * Policy to indicate compliance with the IAccessible2 specification.
- *
- ************************************************************************ /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ISimpleDOM-COM-interfaces-for-accessibility.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title ISimpleDOM COM interfaces for accessibility
-
-\l{http://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-JMake.html
-\ingroup qtwebengine-licensing
-\brief GPL 2.0
-\title JMake
-
-\l{https://github.com/pantsbuild/jmake}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Khronos-header-files.html
-\ingroup qtwebengine-licensing
-\brief MIT/X11, SGI Free Software License B
-\title Khronos header files
-
-\l{http://www.khronos.org/registry}{Project Homepage}
-
-\badcode
-Copyright (c) 2007-2010 The Khronos Group Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and/or associated documentation files (the
-"Materials"), to deal in the Materials without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Materials, and to
-permit persons to whom the Materials are furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Materials.
-
-THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-
-
-SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
-
-Copyright (C) 1992 Silicon Graphics, Inc. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice including the dates of first publication and either
-this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
-shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON
-GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Silicon Graphics, Inc. shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Silicon
-Graphics, Inc.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LCOV---the-LTP-GCOV-extension.html
-\ingroup qtwebengine-licensing
-\brief GPL v2
-\title LCOV - the LTP GCOV extension
-
-\l{http://ltp.sourceforge.net/coverage/lcov.php}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LZMA-SDK.html
-\ingroup qtwebengine-licensing
-\brief Public domain
-\title LZMA SDK
-
-\l{http://www.7-zip.org/sdk.html}{Project Homepage}
-
-\badcode
-LZMA SDK is placed in the public domain.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LevelDB:-A-Fast-Persistent-Key-Value-Store.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title LevelDB: A Fast Persistent Key-Value Store
-
-\l{https://github.com/google/leveldb.git}{Project Homepage}
-
-\badcode
-Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Mojo.html
-\ingroup qtwebengine-licensing
-\brief Chromium
-\title Mojo
-
-\l{https://github.com/domokit/mojo}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-NSBezierPath-additions-from-Sean-Patrick-O'Brien.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title NSBezierPath additions from Sean Patrick O'Brien
-
-\l{http://www.seanpatrickobrien.com/journal/posts/3}{Project Homepage}
-
-\badcode
-Copyright 2008 MolokoCacao
-All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted providing that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-NVidia-Control-X-Extension-Library.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title NVidia Control X Extension Library
-
-\l{http://cgit.freedesktop.org/~aplattner/nvidia-settings/}{Project Homepage}
-
-\badcode
-/*
- * Copyright (c) 2008 NVIDIA, Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- * /
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Netscape-Plugin-Application-Programming-Interface-(NPAPI).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Netscape Plugin Application Programming Interface (NPAPI)
-
-\l{http://mxr.mozilla.org/mozilla-central/source/modules/plugin/base/public/}{Project Homepage}
-
-\badcode
-Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
-The contents of this file are subject to the Mozilla Public License Version
-1.1 (the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-http://www.mozilla.org/MPL/
-
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-for the specific language governing rights and limitations under the
-License.
-
-The Original Code is mozilla.org code.
-
-The Initial Developer of the Original Code is
-Netscape Communications Corporation.
-Portions created by the Initial Developer are Copyright (C) 1998
-the Initial Developer. All Rights Reserved.
-
-Contributor(s):
-
-Alternatively, the contents of this file may be used under the terms of
-either the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-in which case the provisions of the GPL or the LGPL are applicable instead
-of those above. If you wish to allow use of your version of this file only
-under the terms of either the GPL or the LGPL, and not to allow others to
-use your version of this file under the terms of the MPL, indicate your
-decision by deleting the provisions above and replace them with the notice
-and other provisions required by the GPL or the LGPL. If you do not delete
-the provisions above, a recipient may use your version of this file under
-the terms of any one of the MPL, the GPL or the LGPL.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Netscape-Portable-Runtime-(NSPR).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Netscape Portable Runtime (NSPR)
-
-\l{http://www.mozilla.org/projects/nspr/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Network-Security-Services-(NSS).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Network Security Services (NSS)
-
-\l{http://www.mozilla.org/projects/security/pki/nss/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OTS-(OpenType-Sanitizer).html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title OTS (OpenType Sanitizer)
-
-\l{https://github.com/khaledhosny/ots.git}{Project Homepage}
-
-\badcode
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OpenH264.html
-\ingroup qtwebengine-licensing
-\brief 2-Clause BSD
-\title OpenH264
-
-\l{http://www.openh264.org/}{Project Homepage}
-
-\badcode
-Copyright (c) 2013, Cisco Systems
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OpenMAX-DL.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title OpenMAX DL
-
-\l{https://silver.arm.com/download/Software/Graphics/OX000-BU-00010-r1p0-00bet0/OX000-BU-00010-r1p0-00bet0.tgz}{Project Homepage}
-
-\badcode
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file in the root of the source tree. All
-contributing project authors may be found in the AUTHORS file in the
-root of the source tree.
-
-The files were originally licensed by ARM Limited.
-
-The following files:
-
- * dl/api/omxtypes.h
- * dl/sp/api/omxSP.h
-
-are licensed by Khronos:
-
-Copyright © 2005-2008 The Khronos Group Inc. All Rights Reserved.
-
-These materials are protected by copyright laws and contain material
-proprietary to the Khronos Group, Inc. You may use these materials
-for implementing Khronos specifications, without altering or removing
-any trademark, copyright or other notice from the specification.
-
-Khronos Group makes no, and expressly disclaims any, representations
-or warranties, express or implied, regarding these materials, including,
-without limitation, any implied warranties of merchantability or fitness
-for a particular purpose or non-infringement of any intellectual property.
-Khronos Group makes no, and expressly disclaims any, warranties, express
-or implied, regarding the correctness, accuracy, completeness, timeliness,
-and reliability of these materials.
-
-Under no circumstances will the Khronos Group, or any of its Promoters,
-Contributors or Members or their respective partners, officers, directors,
-employees, agents or representatives be liable for any damages, whether
-direct, indirect, special or consequential damages for lost revenues,
-lost profits, or otherwise, arising from or in connection with these
-materials.
-
-Khronos and OpenMAX are trademarks of the Khronos Group Inc.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-PLY-(Python-Lex-Yacc).html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title PLY (Python Lex-Yacc)
-
-\l{http://www.dabeaz.com/ply/ply-3.4.tar.gz}{Project Homepage}
-
-\badcode
-PLY (Python Lex-Yacc) Version 3.4
-
-Copyright (C) 2001-2011,
-David M. Beazley (Dabeaz LLC)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of the David Beazley or Dabeaz LLC may be used to
- endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Paul-Hsieh's-SuperFastHash.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Paul Hsieh's SuperFastHash
-
-\l{http://www.azillionmonkeys.com/qed/hash.html}{Project Homepage}
-
-\badcode
-Paul Hsieh OLD BSD license
-
-Copyright (c) 2010, Paul Hsieh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-* Neither my name, Paul Hsieh, nor the names of any other contributors to the
- code use may not be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Proguard.html
-\ingroup qtwebengine-licensing
-\brief GNU General Public License (GPL), version 2
-\title Proguard
-
-\l{http://proguard.sourceforge.net/}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Protocol-Buffers.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Protocol Buffers
-
-\l{http://protobuf.googlecode.com/svn/trunk}{Project Homepage}
-
-\badcode
-Copyright 2008, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Code generated by the Protocol Buffer compiler is owned by the owner
-of the input file used when generating it. This code is not
-standalone and requires a support library to be linked with it. This
-support library is itself covered by the above license.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Quick-Color-Management-System.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Quick Color Management System
-
-\l{https://github.com/jrmuizel/qcms/tree/v4}{Project Homepage}
-
-\badcode
-qcms
-Copyright (C) 2009 Mozilla Corporation
-Copyright (C) 1998-2007 Marti Maria
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-SMHasher.html
-\ingroup qtwebengine-licensing
-\brief MIT, Public Domain
-\title SMHasher
-
-\l{http://code.google.com/p/smhasher/}{Project Homepage}
-
-\badcode
-All MurmurHash source files are placed in the public domain.
-
-The license below applies to all other code in SMHasher:
-
-Copyright (c) 2011 Google, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Skia.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Skia
-
-\l{https://skia.org/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------------------
-third_party/etc1 is under the following license:
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
---------------------------------------------------------------------------------
-Some files under resources are under the following license:
-
-Unlimited Commercial Use
-We try to make it clear that you may use all clipart from Openclipart even for unlimited commercial use. We believe that giving away our images is a great way to share with the world our talents and that will come back around in a better form.
-
-May I Use Openclipart for?
-We put together a small chart of as many possibilities and questions we have heard from people asking how they may use Openclipart. If you have an additional question, please email love@openclipart.org.
-
-All Clipart are Released into the Public Domain.
-Each artist at Openclipart releases all rights to the images they share at Openclipart. The reason is so that there is no friction in using and sharing images authors make available at this website so that each artist might also receive the same benefit in using other artists clipart totally for any possible reason.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Snappy:-A-fast-compressor/decompressor.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title Snappy: A fast compressor/decompressor
-
-\l{http://google.github.io/snappy/}{Project Homepage}
-
-\badcode
-Copyright 2011, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Speech-Dispatcher.html
-\ingroup qtwebengine-licensing
-\brief GPL (v2 or later)
-\title Speech Dispatcher
-
-\l{http://devel.freebsoft.org/speechd}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-
-
-
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Strongtalk.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Strongtalk
-
-\l{http://www.strongtalk.org/}{Project Homepage}
-
-\badcode
-Copyright (c) 1994-2006 Sun Microsystems Inc.
-All Rights Reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-- Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-- Redistribution in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of Sun Microsystems or the names of contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Sudden-Motion-Sensor-library.html
-\ingroup qtwebengine-licensing
-\brief University of Illinois/NCSA Open Source License
-\title Sudden Motion Sensor library
-
-\l{http://www.suitable.com/tools/smslib.html}{Project Homepage}
-
-\badcode
-SMSLib Sudden Motion Sensor Access Library
-Copyright (c) 2010 Suitable Systems
-All rights reserved.
-
-Developed by: Daniel Griscom
- Suitable Systems
- http://www.suitable.com
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal with the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-- Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimers.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimers in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the names of Suitable Systems nor the names of its
-contributors may be used to endorse or promote products derived from
-this Software without specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-
-For more information about SMSLib, see
- &lt;http://www.suitable.com/tools/smslib.html&gt;
-or contact
- Daniel Griscom
- Suitable Systems
- 1 Centre Street, Suite 204
- Wakefield, MA 01880
- (781) 665-0053
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-SwiftShader-software-renderer..html
-\ingroup qtwebengine-licensing
-\brief Proprietary
-\title SwiftShader software renderer.
-
-\l{http://transgaming.com/business/swiftshader}{Project Homepage}
-
-\badcode
-This product includes SwiftShader Software GPU Tookit,
-Copyright(c)2003-2011 TransGaming Inc
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-The-USB-ID-Repository.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title The USB ID Repository
-
-\l{http://www.linux-usb.org/usb-ids.html}{Project Homepage}
-
-\badcode
-Copyright (c) 2012, Linux USB Project
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-o Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-o Neither the name of the Linux USB Project nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-V8-JavaScript-Engine.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title V8 JavaScript Engine
-
-\l{http://code.google.com/p/v8}{Project Homepage}
-
-\badcode
-This license applies to all parts of V8 that are not externally
-maintained libraries. The externally maintained libraries used by V8
-are:
-
- - PCRE test suite, located in
- test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the
- test suite from PCRE-7.3, which is copyrighted by the University
- of Cambridge and Google, Inc. The copyright notice and license
- are embedded in regexp-pcre.js.
-
- - Layout tests, located in test/mjsunit/third_party/object-keys. These are
- based on layout tests from webkit.org which are copyrighted by
- Apple Computer, Inc. and released under a 3-clause BSD license.
-
- - Strongtalk assembler, the basis of the files assembler-arm-inl.h,
- assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
- assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
- assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
- assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
- This code is copyrighted by Sun Microsystems Inc. and released
- under a 3-clause BSD license.
-
- - Valgrind client API header, located at third_party/valgrind/valgrind.h
- This is release under the BSD license.
-
-These libraries have their own licenses; we recommend you read them,
-as their terms may differ from the terms below.
-
-Further license information can be found in LICENSE files located in
-sub-directories.
-
-Copyright 2014, the V8 project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of Google Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Web-Animations-JS.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Web Animations JS
-
-\l{https://github.com/web-animations/web-animations-js}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebKit.html
-\ingroup qtwebengine-licensing
-\brief BSD and GPL v2
-\title WebKit
-
-\l{http://webkit.org/}{Project Homepage}
-
-\badcode
-(WebKit doesn't distribute an explicit license. This LICENSE is derived from
-license text in the source.)
-
-Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007 Alexander Kellett, Alexey Proskuryakov, Alex Mathews, Allan
-Sandfeld Jensen, Alp Toker, Anders Carlsson, Andrew Wellington, Antti
-Koivisto, Apple Inc., Arthur Langereis, Baron Schwartz, Bjoern Graf,
-Brent Fulgham, Cameron Zwarich, Charles Samuels, Christian Dywan,
-Collabora Ltd., Cyrus Patel, Daniel Molkentin, Dave Maclachlan, David
-Smith, Dawit Alemayehu, Dirk Mueller, Dirk Schulze, Don Gibson, Enrico
-Ros, Eric Seidel, Frederik Holljen, Frerich Raabe, Friedmann Kleint,
-George Staikos, Google Inc., Graham Dennis, Harri Porten, Henry Mason,
-Hiroyuki Ikezoe, Holger Hans Peter Freyther, IBM, James G. Speth, Jan
-Alonzo, Jean-Loup Gailly, John Reis, Jonas Witt, Jon Shier, Jonas
-Witt, Julien Chaffraix, Justin Haygood, Kevin Ollivier, Kevin Watters,
-Kimmo Kinnunen, Kouhei Sutou, Krzysztof Kowalczyk, Lars Knoll, Luca
-Bruno, Maks Orlovich, Malte Starostik, Mark Adler, Martin Jones,
-Marvin Decker, Matt Lilek, Michael Emmel, Mitz Pettel, mozilla.org,
-Netscape Communications Corporation, Nicholas Shanks, Nikolas
-Zimmermann, Nokia, Oliver Hunt, Opened Hand, Paul Johnston, Peter
-Kelly, Pioneer Research Center USA, Rich Moore, Rob Buis, Robin Dunn,
-Ronald Tschalär, Samuel Weinig, Simon Hausmann, Staikos Computing
-Services Inc., Stefan Schimanski, Symantec Corporation, The Dojo
-Foundation, The Karbon Developers, Thomas Boyer, Tim Copperfield,
-Tobias Anton, Torben Weis, Trolltech, University of Cambridge, Vaclav
-Slavik, Waldo Bastian, Xan Lopez, Zack Rusin
-
-The terms and conditions vary from file to file, but are one of:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-
-*OR*
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- its contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebM-container-parser-and-writer..html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebM container parser and writer.
-
-\l{http://www.webmproject.org/code/}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebP-image-encoder/decoder.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebP image encoder/decoder
-
-\l{http://developers.google.com/speed/webp}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Additional IP Rights Grant (Patents)
-------------------------------------
-
-"These implementations" means the copyrightable works that implement the WebM
-codecs distributed by Google as part of the WebM Project.
-
-Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable (except as stated in this section) patent license to
-make, have made, use, offer to sell, sell, import, transfer, and otherwise
-run, modify and propagate the contents of these implementations of WebM, where
-such license applies only to those patent claims, both currently owned by
-Google and acquired in the future, licensable by Google that are necessarily
-infringed by these implementations of WebM. This grant does not include claims
-that would be infringed only as a consequence of further modification of these
-implementations. If you or your agent or exclusive licensee institute or order
-or agree to the institution of patent litigation or any other patent
-enforcement activity against any entity (including a cross-claim or
-counterclaim in a lawsuit) alleging that any of these implementations of WebM
-or any code incorporated within any of these implementations of WebM
-constitute direct or contributory patent infringement, or inducement of
-patent infringement, then any patent rights granted to you under this License
-for these implementations of WebM shall terminate as of the date such
-litigation is filed.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebRTC.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebRTC
-
-\l{http://www.webrtc.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2011, The WebRTC project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Windows-Template-Library-(WTL).html
-\ingroup qtwebengine-licensing
-\brief Microsoft Permissive License
-\title Windows Template Library (WTL)
-
-\l{http://wtl.sourceforge.net/}{Project Homepage}
-
-\badcode
-Microsoft Permissive License (Ms-PL)
-Published: October 12, 2006
-
-
-This license governs use of the accompanying software. If you use the software,
-you accept this license. If you do not accept the license, do not use the
-software.
-
-
-1. Definitions
-
-The terms "reproduce," "reproduction," "derivative works," and "distribution"
-have the same meaning here as under U.S. copyright law.
-
-A "contribution" is the original software, or any additions or changes to the
-software.
-
-A "contributor" is any person that distributes its contribution under this
-license.
-
-"Licensed patents" are a contributor’s patent claims that read directly on its
-contribution.
-
-
-2. Grant of Rights
-
-(A) Copyright Grant- Subject to the terms of this license, including the
-license conditions and limitations in section 3, each contributor grants you a
-non-exclusive, worldwide, royalty-free copyright license to reproduce its
-contribution, prepare derivative works of its contribution, and distribute its
-contribution or any derivative works that you create.
-
-(B) Patent Grant- Subject to the terms of this license, including the license
-conditions and limitations in section 3, each contributor grants you a
-non-exclusive, worldwide, royalty-free license under its licensed patents to
-make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
-its contribution in the software or derivative works of the contribution in the
-software.
-
-
-3. Conditions and Limitations
-
-(A) No Trademark License- This license does not grant you rights to use any
-contributors’ name, logo, or trademarks.
-
-(B) If you bring a patent claim against any contributor over patents that you
-claim are infringed by the software, your patent license from such contributor
-to the software ends automatically.
-
-(C) If you distribute any portion of the software, you must retain all
-copyright, patent, trademark, and attribution notices that are present in the
-software.
-
-(D) If you distribute any portion of the software in source code form, you may
-do so only under this license by including a complete copy of this license with
-your distribution. If you distribute any portion of the software in compiled or
-object code form, you may only do so under a license that complies with this
-license.
-
-(E) The software is licensed "as-is." You bear the risk of using it. The
-contributors give no express warranties, guarantees or conditions. You may have
-additional consumer rights under your local laws which this license cannot
-change. To the extent permitted under your local laws, the contributors exclude
-the implied warranties of merchantability, fitness for a particular purpose and
-non-infringement.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-boringssl.html
-\ingroup qtwebengine-licensing
-\brief BSDish
-\title boringssl
-
-\l{https://boringssl.googlesource.com/boringssl}{Project Homepage}
-
-\badcode
-
- LICENSE ISSUES
- ==============
-
- The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
- the OpenSSL License and the original SSLeay license apply to the toolkit.
- See below for the actual license texts. Actually both licenses are BSD-style
- Open Source licenses. In case of any license issues related to OpenSSL
- please contact openssl-core@openssl.org.
-
- OpenSSL License
- ---------------
-
-/* ====================================================================
- * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- * /
-
- Original SSLeay License
- -----------------------
-
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- * /
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-bspatch.html
-\ingroup qtwebengine-licensing
-\brief BSD Protection license
-\title bspatch
-
-\l{http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/}{Project Homepage}
-
-\badcode
-BSD Protection License
-February 2002
-
-Preamble
---------
-
-The Berkeley Software Distribution ("BSD") license has proven very effective
-over the years at allowing for a wide spread of work throughout both
-commercial and non-commercial products. For programmers whose primary
-intention is to improve the general quality of available software, it is
-arguable that there is no better license than the BSD license, as it
-permits improvements to be used wherever they will help, without idealogical
-or metallic constraint.
-
-This is of particular value to those who produce reference implementations
-of proposed standards: The case of TCP/IP clearly illustrates that freely
-and universally available implementations leads the rapid acceptance of
-standards -- often even being used instead of a de jure standard (eg, OSI
-network models).
-
-With the rapid proliferation of software licensed under the GNU General
-Public License, however, the continued success of this role is called into
-question. Given that the inclusion of a few lines of "GPL-tainted" work
-into a larger body of work will result in restricted distribution -- and
-given that further work will likely build upon the "tainted" portions,
-making them difficult to remove at a future date -- there are inevitable
-circumstances where authors would, in order to protect their goal of
-providing for the widespread usage of their work, wish to guard against
-such "GPL-taint".
-
-In addition, one can imagine that companies which operate by producing and
-selling (possibly closed-source) code would wish to protect themselves
-against the rise of a GPL-licensed competitor. While under existing
-licenses this would mean not releasing their code under any form of open
-license, if a license existed under which they could incorporate any
-improvements back into their own (commercial) products then they might be
-far more willing to provide for non-closed distribution.
-
-For the above reasons, we put forth this "BSD Protection License": A
-license designed to retain the freedom granted by the BSD license to use
-licensed works in a wide variety of settings, both non-commercial and
-commercial, while protecting the work from having future contributors
-restrict that freedom.
-
-The precise terms and conditions for copying, distribution, and
-modification follow.
-
-BSD PROTECTION LICENSE
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
-----------------------------------------------------------------
-
-0. Definitions.
- a) "Program", below, refers to any program or work distributed under
- the terms of this license.
- b) A "work based on the Program", below, refers to either the Program
- or any derivative work under copyright law.
- c) "Modification", below, refers to the act of creating derivative works.
- d) "You", below, refers to each licensee.
-
-1. Scope.
- This license governs the copying, distribution, and modification of the
- Program. Other activities are outside the scope of this license; The
- act of running the Program is not restricted, and the output from the
- Program is covered only if its contents constitute a work based on the
- Program.
-
-2. Verbatim copies.
- You may copy and distribute verbatim copies of the Program as you
- receive it, in any medium, provided that you conspicuously and
- appropriately publish on each copy an appropriate copyright notice; keep
- intact all the notices that refer to this License and to the absence of
- any warranty; and give any other recipients of the Program a copy of this
- License along with the Program.
-
-3. Modification and redistribution under closed license.
- You may modify your copy or copies of the Program, and distribute
- the resulting derivative works, provided that you meet the
- following conditions:
- a) The copyright notice and disclaimer on the Program must be reproduced
- and included in the source code, documentation, and/or other materials
- provided in a manner in which such notices are normally distributed.
- b) The derivative work must be clearly identified as such, in order that
- it may not be confused with the original work.
- c) The license under which the derivative work is distributed must
- expressly prohibit the distribution of further derivative works.
-
-4. Modification and redistribution under open license.
- You may modify your copy or copies of the Program, and distribute
- the resulting derivative works, provided that you meet the
- following conditions:
- a) The copyright notice and disclaimer on the Program must be reproduced
- and included in the source code, documentation, and/or other materials
- provided in a manner in which such notices are normally distributed.
- b) You must clearly indicate the nature and date of any changes made
- to the Program. The full details need not necessarily be included in
- the individual modified files, provided that each modified file is
- clearly marked as such and instructions are included on where the
- full details of the modifications may be found.
- c) You must cause any work that you distribute or publish, that in whole
- or in part contains or is derived from the Program or any part
- thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
-5. Implied acceptance.
- You may not copy or distribute the Program or any derivative works except
- as expressly provided under this license. Consequently, any such action
- will be taken as implied acceptance of the terms of this license.
-
-6. NO WARRANTY.
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGES.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-class-dump.html
-\ingroup qtwebengine-licensing
-\brief GPL
-\title class-dump
-
-\l{https://github.com/nygard/class-dump}{Project Homepage}
-
-\badcode
-(Copied from the README.)
-
---------------------------------------------------------------------------------
-
-This file is part of class-dump, a utility for examining the
-Objective-C segment of Mach-O files.
-Copyright (C) 1997-1998, 2000-2001, 2004-2013 Steve Nygard.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Contact
--------
-
-You may contact the author by:
- e-mail: nygard at gmail.com
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-d3.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title d3
-
-\l{https://github.com/mbostock/d3}{Project Homepage}
-
-\badcode
-Copyright (c) 2010-2014, Michael Bostock
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* The name Michael Bostock may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-dom-distiller-js.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title dom-distiller-js
-
-\l{https://github.com/chromium/dom-distiller}{Project Homepage}
-
-\badcode
-Copyright 2014 The Chromium Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-Parts of the following directories are available under Apache v2.0
-
-src/de
-Copyright (c) 2009-2011 Christian Kohlschütter
-
-third_party/gwt_exporter
-Copyright 2007 Timepedia.org
-
-third_party/gwt-2.5.1
-Copyright 2008 Google
-
-java/org/chromium/distiller/dev
-Copyright 2008 Google
-
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
-
-You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-dynamic-annotations.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title dynamic annotations
-
-\l{http://code.google.com/p/data-race-test/wiki/DynamicAnnotations}{Project Homepage}
-
-\badcode
-/* Copyright (c) 2008-2009, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ---
- * Author: Kostya Serebryany
- * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fdlibm.html
-\ingroup qtwebengine-licensing
-\brief Freely Distributable
-\title fdlibm
-
-\l{http://www.netlib.org/fdlibm/}{Project Homepage}
-
-\badcode
-Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
-
-Developed at SunSoft, a Sun Microsystems, Inc. business.
-Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice
-is preserved.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ffmpeg.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title ffmpeg
-
-\l{http://ffmpeg.org/}{Project Homepage}
-
-\badcode
-#FFmpeg:
-
-Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
-or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other
-files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
-FFmpeg.
-
-Some optional parts of FFmpeg are licensed under the GNU General Public License
-version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of
-these parts are used by default, you have to explicitly pass `--enable-gpl` to
-configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
-
-Specifically, the GPL parts of FFmpeg are:
-
-- libpostproc
-- optional x86 optimizations in the files
- - `libavcodec/x86/flac_dsp_gpl.asm`
- - `libavcodec/x86/idct_mmx.c`
- - `libavfilter/x86/vf_removegrain.asm`
-- libutvideo encoding/decoding wrappers in
- `libavcodec/libutvideo*.cpp`
-- the X11 grabber in `libavdevice/x11grab.c`
-- the swresample test app in
- `libswresample/swresample-test.c`
-- the `texi2pod.pl` tool
-- the following filters in libavfilter:
- - `f_ebur128.c`
- - `vf_blackframe.c`
- - `vf_boxblur.c`
- - `vf_colormatrix.c`
- - `vf_cover_rect.c`
- - `vf_cropdetect.c`
- - `vf_delogo.c`
- - `vf_eq.c`
- - `vf_find_rect.c`
- - `vf_fspp.c`
- - `vf_geq.c`
- - `vf_histeq.c`
- - `vf_hqdn3d.c`
- - `vf_interlace.c`
- - `vf_kerndeint.c`
- - `vf_mcdeint.c`
- - `vf_mpdecimate.c`
- - `vf_owdenoise.c`
- - `vf_perspective.c`
- - `vf_phase.c`
- - `vf_pp.c`
- - `vf_pp7.c`
- - `vf_pullup.c`
- - `vf_sab.c`
- - `vf_smartblur.c`
- - `vf_repeatfields.c`
- - `vf_spp.c`
- - `vf_stereo3d.c`
- - `vf_super2xsai.c`
- - `vf_tinterlace.c`
- - `vf_uspp.c`
- - `vsrc_mptestsrc.c`
-
-Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
-the configure parameter `--enable-version3` will activate this licensing option
-for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,
-`COPYING.GPLv3` to learn the exact legal terms that apply in this case.
-
-There are a handful of files under other licensing terms, namely:
-
-* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and
- `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for
- licensing details. Specifically note that you must credit the IJG in the
- documentation accompanying your program if you only distribute executables.
- You must also indicate any changes including additions and deletions to
- those three files in the documentation.
-* `tests/reference.pnm` is under the expat license.
-
-
-external libraries
-==================
-
-FFmpeg can be combined with a number of external libraries, which sometimes
-affect the licensing of binaries resulting from the combination.
-
-compatible libraries
---------------------
-
-The following libraries are under GPL:
-- frei0r
-- libcdio
-- librubberband
-- libutvideo
-- libvidstab
-- libx264
-- libx265
-- libxavs
-- libxvid
-
-When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
-passing `--enable-gpl` to configure.
-
-The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
-license is incompatible with the LGPL v2.1 and the GPL v2, but not with
-version 3 of those licenses. So to combine these libraries with FFmpeg, the
-license version needs to be upgraded by passing `--enable-version3` to configure.
-
-incompatible libraries
-----------------------
-
-The Fraunhofer AAC library, FAAC and aacplus are under licenses which
-are incompatible with the GPLv2 and v3. We do not know for certain if their
-licenses are compatible with the LGPL.
-If you wish to enable these libraries, pass `--enable-nonfree` to configure.
-But note that if you enable any of these libraries the resulting binary will
-be under a complex license mix that is more restrictive than the LGPL and that
-may result in additional obligations. It is possible that these
-restrictions cause the resulting binary to be unredistributeable.
-
-
-********************************************************************************
-
-libavcodec/arm/vp8dsp_armv6.S
-
-VP8 ARMv6 optimisations
-
-Copyright (c) 2010 Google Inc.
-Copyright (c) 2010 Rob Clark &lt;rob@ti.com&gt;
-Copyright (c) 2011 Mans Rullgard &lt;mans@mansr.com&gt;
-
-This file is part of FFmpeg.
-
-FFmpeg is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-FFmpeg is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with FFmpeg; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-This code was partially ported from libvpx, which uses this license:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in
-the documentation and/or other materials provided with the
-distribution.
-
-* Neither the name of Google nor the names of its contributors may
-be used to endorse or promote products derived from this software
-without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-********************************************************************************
-
-libavformat/oggparsespeex.c
-
-Copyright (C) 2008 Reimar Döffinger
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use, copy,
- modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libavcodec/x86/xvididct.asm
-
-XVID MPEG-4 VIDEO CODEC
-
- Conversion from gcc syntax to x264asm syntax with modifications
- by Christophe Gisquet &lt;christophe.gisquet@gmail.com&gt;
-
- =========== SSE2 inverse discrete cosine transform ===========
-
- Copyright(C) 2003 Pascal Massimino &lt;skal@planet-d.net&gt;
-
- Conversion to gcc syntax with modifications
- by Alexander Strange &lt;astrange@ithinksw.com&gt;
-
- Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid.
-
- Vertical pass is an implementation of the scheme:
- Loeffler C., Ligtenberg A., and Moschytz C.S.:
- Practical Fast 1D DCT Algorithm with Eleven Multiplications,
- Proc. ICASSP 1989, 988-991.
-
- Horizontal pass is a double 4x4 vector/matrix multiplication,
- (see also Intel's Application Note 922:
- http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
- Copyright (C) 1999 Intel Corporation)
-
- More details at http://skal.planet-d.net/coding/dct.html
-
- ======= MMX and XMM forward discrete cosine transform =======
-
- Copyright(C) 2001 Peter Ross &lt;pross@xvid.org&gt;
-
- Originally provided by Intel at AP-922
- http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
- (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm)
- but in a limited edition.
- New macro implements a column part for precise iDCT
- The routine precision now satisfies IEEE standard 1180-1990.
-
- Copyright(C) 2000-2001 Peter Gubanov &lt;peter@elecard.net.ru&gt;
- Rounding trick Copyright(C) 2000 Michel Lespinasse &lt;walken@zoy.org&gt;
-
- http://www.elecard.com/peter/idct.html
- http://www.linuxvideo.org/mpeg2dec/
-
- These examples contain code fragments for first stage iDCT 8x8
- (for rows) and first stage DCT 8x8 (for columns)
-
- conversion to gcc syntax by Michael Niedermayer
-
- ======================================================================
-
- This file is part of FFmpeg.
-
- FFmpeg is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- FFmpeg is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with FFmpeg; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/arm/jrevdct_arm.S
-
-C-like prototype :
- void j_rev_dct_arm(DCTBLOCK data)
-
- With DCTBLOCK being a pointer to an array of 64 'signed shorts'
-
- Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libswresample/version.h
-
-Version macros.
-
-This file is part of libswresample
-
-libswresample is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-libswresample is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with libswresample; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/faandct.c
-
-Floating point AAN DCT
-this implementation is based upon the IJG integer AAN DCT (see jfdctfst.c)
-
-Copyright (c) 2003 Michael Niedermayer &lt;michaelni@gmx.at&gt;
-Copyright (c) 2003 Roman Shaposhnik
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************************************
-
-libavformat/oggparsetheora.c
-
-Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libswresample/swresample.h
-
-Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
-
-This file is part of libswresample
-
-libswresample is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-libswresample is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with libswresample; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/jfdctfst.c
-libavcodec/jfdctint_template.c
-libavcodec/jrevdct.c
-
-This file is part of the Independent JPEG Group's software.
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and
-you, its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1994-1996, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to
-these conditions:
-(1) If any part of the source code for this software is distributed, then
-this README file must be included, with this copyright and no-warranty
-notice unaltered; and any additions, deletions, or changes to the original
-files must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work
-of the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG
-code, not just to the unmodified library. If you use our work, you ought
-to acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company
-name in advertising or publicity relating to this software or products
-derived from it. This software may be referred to only as "the Independent
-JPEG Group's software".
-
-We specifically permit and encourage the use of this software as the basis
-of commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-********************************************************************************
-
-libavcodec/fft_fixed_32.c
-libavcodec/fft_init_table.c
-libavcodec/fft_table.h
-libavcodec/mdct_fixed_32.c
-libavcodec/mips/aacdec_mips.c
-libavcodec/mips/aacdec_mips.h
-libavcodec/mips/aacpsdsp_mips.c
-libavcodec/mips/aacsbr_mips.c
-libavcodec/mips/aacsbr_mips.h
-libavcodec/mips/amrwbdec_mips.h
-libavcodec/mips/compute_antialias_fixed.h
-libavcodec/mips/compute_antialias_float.h
-libavcodec/mips/lsp_mips.h
-libavcodec/mips/sbrdsp_mips.c
-libavutil/fixed_dsp.c
-libavutil/fixed_dsp.h
-libavutil/mips/float_dsp_mips.c
-libavutil/mips/libm_mips.h
-libavutil/softfloat_tables.h
-
-Copyright (c) 2012
-MIPS Technologies, Inc., California.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. Neither the name of the MIPS Technologies, Inc., nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-Authors:
-Branimir Vasic (bvasic@mips.com)
-Darko Laus (darko@mips.com)
-Djordje Pesut (djordje@mips.com)
-Goran Cordasic (goran@mips.com)
-Nedeljko Babic (nedeljko.babic imgtec com)
-Mirjana Vulin (mvulin@mips.com)
-Stanislav Ocovaj (socovaj@mips.com)
-Zoran Lukic (zoranl@mips.com)
-
-********************************************************************************
-
-libavformat/oggdec.c
-libavformat/oggdec.h
-libavformat/oggparseogm.c
-libavformat/oggparsevorbis.c
-
-Copyright (C) 2005 Michael Ahlberg, Måns Rullgård
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fips181.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title fips181
-
-\l{http://www.adel.nursat.kz/apg/}{Project Homepage}
-
-\badcode
-Copyright (c) 1999, 2000, 2001, 2002
-Adel I. Mirzazhanov. All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1.Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2.Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3.The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-flac.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title flac
-
-\l{http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz/download}{Project Homepage}
-
-\badcode
-Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of the Xiph.org Foundation nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fontconfig.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title fontconfig
-
-\l{http://www.freedesktop.org/wiki/Software/fontconfig/}{Project Homepage}
-
-\badcode
-fontconfig/COPYING
-
-Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
-Copyright © 2005 Patrick Lam
-Copyright © 2009 Roozbeh Pournader
-Copyright © 2008,2009 Red Hat, Inc.
-Copyright © 2008 Danilo Šegan
-Copyright © 2012 Google, Inc.
-
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of the author(s) not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission. The authors make no
-representations about the suitability of this software for any purpose. It
-is provided "as is" without express or implied warranty.
-
-THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-glog's-symbolization-library.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title google-glog's symbolization library
-
-\l{https://github.com/google/glog}{Project Homepage}
-
-\badcode
-// Copyright (c) 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-jstemplate.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title google-jstemplate
-
-\l{http://code.google.com/p/google-jstemplate/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-safe-browsing.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title google-safe-browsing
-
-\l{http://code.google.com/p/google-safe-browsing/}{Project Homepage}
-
-\badcode
-Copyright 2009 Google Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-harfbuzz-ng.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title harfbuzz-ng
-
-\l{http://harfbuzz.org}{Project Homepage}
-
-\badcode
-HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
-For parts of HarfBuzz that are licensed under different licenses see individual
-files names COPYING in subdirectories where applicable.
-
-Copyright © 2010,2011,2012 Google, Inc.
-Copyright © 2012 Mozilla Foundation
-Copyright © 2011 Codethink Limited
-Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
-Copyright © 2009 Keith Stribley
-Copyright © 2009 Martin Hosken and SIL International
-Copyright © 2007 Chris Wilson
-Copyright © 2006 Behdad Esfahbod
-Copyright © 2005 David Turner
-Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
-Copyright © 1998-2004 David Turner and Werner Lemberg
-
-For full copyright notices consult the individual files in the package.
-
-
-Permission is hereby granted, without written agreement and without
-license or royalty fees, to use, copy, modify, and distribute this
-software and its documentation for any purpose, provided that the
-above copyright notice and the following two paragraphs appear in
-all copies of this software.
-
-IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-hunspell.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title hunspell
-
-\l{http://hunspell.sourceforge.net/}{Project Homepage}
-
-\badcode
-GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
-
-The contents of this software may be used under the terms of
-the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
-see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the
-intl/ directory) the Mozilla Public License Version 1.1 or later
-(the "MPL", see COPYING.MPL).
-
-Software distributed under these licenses is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
-for the specific language governing rights and limitations under the licenses.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-iccjpeg.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title iccjpeg
-
-\l{http://www.ijg.org}{Project Homepage}
-
-\badcode
-LICENSE extracted from IJG's jpeg distribution:
------------------------------------------------
-
-In plain English:
-
-1. We don't promise that this software works. (But if you find any bugs,
- please let us know!)
-2. You can use this software for whatever you want. You don't have to pay us.
-3. You may not pretend that you wrote this software. If you use it in a
- program, you must acknowledge somewhere in your documentation that
- you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-icu.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title icu
-
-\l{http://site.icu-project.org/}{Project Homepage}
-
-\badcode
-ICU License - ICU 1.8.1 and later
-
- COPYRIGHT AND PERMISSION NOTICE
-
- Copyright (c) 1995-2014 International Business Machines Corporation and
- others
-
- All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, and/or sell copies of the Software, and to permit persons to
- whom the Software is furnished to do so, provided that the above
- copyright notice(s) and this permission notice appear in all copies of
- the Software and that both the above copyright notice(s) and this
- permission notice appear in supporting documentation.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
- THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
- INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
- OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-
- Except as contained in this notice, the name of a copyright holder shall
- not be used in advertising or otherwise to promote the sale, use or
- other dealings in this Software without prior written authorization of
- the copyright holder.
- ___________________________________________________________________
-
- All trademarks and registered trademarks mentioned herein are the
- property of their respective owners.
- ___________________________________________________________________
-
-Third-Party Software Licenses
-
- This section contains third-party software notices and/or additional
- terms for licensed third-party software components included within ICU
- libraries.
-
- 1. Unicode Data Files and Software
-
-COPYRIGHT AND PERMISSION NOTICE
-
-Copyright © 1991-2014 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in
-http://www.unicode.org/copyright.html.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Unicode data files and any associated documentation
-(the "Data Files") or Unicode software and any associated documentation
-(the "Software") to deal in the Data Files or Software
-without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, and/or sell copies of
-the Data Files or Software, and to permit persons to whom the Data Files
-or Software are furnished to do so, provided that
-(a) this copyright and permission notice appear with all copies
-of the Data Files or Software,
-(b) this copyright and permission notice appear in associated
-documentation, and
-(c) there is clear notice in each modified Data File or in the Software
-as well as in the documentation associated with the Data File(s) or
-Software that the data or software has been modified.
-
-THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
-NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
-DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THE DATA FILES OR SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder
-shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in these Data Files or Software without prior
-written authorization of the copyright holder.
-
- 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
-
- # The Google Chrome software developed by Google is licensed under the BSD li
-cense. Other software included in this distribution is provided under other licen
-ses, as set forth below.
- #
- # The BSD License
- # http://opensource.org/licenses/bsd-license.php
- # Copyright (C) 2006-2008, Google Inc.
- #
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation, are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright notice, th
-is list of conditions and the following disclaimer.
- # Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
- # Neither the name of Google Inc. nor the names of its contributors may be
- used to endorse or promote products derived from this software without specific
-prior written permission.
- #
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPL
-IED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLA
-IMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIR
-ECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDIN
-G, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF L
-IABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O
-F THE POSSIBILITY OF SUCH DAMAGE.
- #
- #
- # The word list in cjdict.txt are generated by combining three word lists l
-isted
- # below with further processing for compound word breaking. The frequency i
-s generated
- # with an iterative training against Google web corpora.
- #
- # * Libtabe (Chinese)
- # - https://sourceforge.net/project/?group_id=1519
- # - Its license terms and conditions are shown below.
- #
- # * IPADIC (Japanese)
- # - http://chasen.aist-nara.ac.jp/chasen/distribution.html
- # - Its license terms and conditions are shown below.
- #
- # ---------COPYING.libtabe ---- BEGIN--------------------
- #
- # /*
- # * Copyrighy (c) 1999 TaBE Project.
- # * Copyright (c) 1999 Pai-Hsiang Hsiao.
- # * All rights reserved.
- # *
- # * Redistribution and use in source and binary forms, with or without
- # * modification, are permitted provided that the following conditions
- # * are met:
- # *
- # * . Redistributions of source code must retain the above copyright
- # * notice, this list of conditions and the following disclaimer.
- # * . Redistributions in binary form must reproduce the above copyright
- # * notice, this list of conditions and the following disclaimer in
- # * the documentation and/or other materials provided with the
- # * distribution.
- # * . Neither the name of the TaBE Project nor the names of its
- # * contributors may be used to endorse or promote products derived
- # * from this software without specific prior written permission.
- # *
- # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- # * OF THE POSSIBILITY OF SUCH DAMAGE.
- # * /
- #
- # /*
- # * Copyright (c) 1999 Computer Systems and Communication Lab,
- # * Institute of Information Science, Academia Sinica.
- # * All rights reserved.
- # *
- # * Redistribution and use in source and binary forms, with or without
- # * modification, are permitted provided that the following conditions
- # * are met:
- # *
- # * . Redistributions of source code must retain the above copyright
- # * notice, this list of conditions and the following disclaimer.
- # * . Redistributions in binary form must reproduce the above copyright
- # * notice, this list of conditions and the following disclaimer in
- # * the documentation and/or other materials provided with the
- # * distribution.
- # * . Neither the name of the Computer Systems and Communication Lab
- # * nor the names of its contributors may be used to endorse or
- # * promote products derived from this software without specific
- # * prior written permission.
- # *
- # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- # * OF THE POSSIBILITY OF SUCH DAMAGE.
- # * /
- #
- # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois
- # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
- #
- # ---------------COPYING.libtabe-----END-----------------------------------
--
- #
- #
- # ---------------COPYING.ipadic-----BEGIN----------------------------------
---
- #
- # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
- # and Technology. All Rights Reserved.
- #
- # Use, reproduction, and distribution of this software is permitted.
- # Any copy of this software, whether in its original form or modified,
- # must include both the above copyright notice and the following
- # paragraphs.
- #
- # Nara Institute of Science and Technology (NAIST),
- # the copyright holders, disclaims all warranties with regard to this
- # software, including all implied warranties of merchantability and
- # fitness, in no event shall NAIST be liable for
- # any special, indirect or consequential damages or any damages
- # whatsoever resulting from loss of use, data or profits, whether in an
- # action of contract, negligence or other tortuous action, arising out
- # of or in connection with the use or performance of this software.
- #
- # A large portion of the dictionary entries
- # originate from ICOT Free Software. The following conditions for ICOT
- # Free Software applies to the current dictionary as well.
- #
- # Each User may also freely distribute the Program, whether in its
- # original form or modified, to any third party or parties, PROVIDED
- # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
- # on, or be attached to, the Program, which is distributed substantially
- # in the same form as set out herein and that such intended
- # distribution, if actually made, will neither violate or otherwise
- # contravene any of the laws and regulations of the countries having
- # jurisdiction over the User or the intended distribution itself.
- #
- # NO WARRANTY
- #
- # The program was produced on an experimental basis in the course of the
- # research and development conducted during the project and is provided
- # to users as so produced on an experimental basis. Accordingly, the
- # program is provided without any warranty whatsoever, whether express,
- # implied, statutory or otherwise. The term "warranty" used herein
- # includes, but is not limited to, any warranty of the quality,
- # performance, merchantability and fitness for a particular purpose of
- # the program and the nonexistence of any infringement or violation of
- # any right of any third party.
- #
- # Each user of the program will agree and understand, and be deemed to
- # have agreed and understood, that there is no warranty whatsoever for
- # the program and, accordingly, the entire risk arising from or
- # otherwise connected with the program is assumed by the user.
- #
- # Therefore, neither ICOT, the copyright holder, or any other
- # organization that participated in or was otherwise related to the
- # development of the program and their respective officials, directors,
- # officers and other employees shall be held liable for any and all
- # damages, including, without limitation, general, special, incidental
- # and consequential damages, arising out of or otherwise in connection
- # with the use or inability to use the program or any product, material
- # or result produced or otherwise obtained by using the program,
- # regardless of whether they have been advised of, or otherwise had
- # knowledge of, the possibility of such damages at any time during the
- # project or thereafter. Each user will be deemed to have agreed to the
- # foregoing by his or her commencement of use of the program. The term
- # "use" as used herein includes, but is not limited to, the use,
- # modification, copying and distribution of the program and the
- # production of secondary products from the program.
- #
- # In the case where the program, whether in its original form or
- # modified, was distributed or delivered to or received by a user from
- # any person, organization or entity other than ICOT, unless it makes or
- # grants independently of ICOT any specific warranty to the user in
- # writing, such person, organization or entity, will also be exempted
- # from and not be held liable to the user for any such damages as noted
- # above as far as the program is concerned.
- #
- # ---------------COPYING.ipadic-----END------------------------------------
-
- 3. Lao Word Break Dictionary Data (laodict.txt)
-
- # Copyright (c) 2013 International Business Machines Corporation
- # and others. All Rights Reserved.
- #
- # Project: http://code.google.com/p/lao-dictionary/
- # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
- # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICEN
-SE.txt
- # (copied below)
- #
- # This file is derived from the above dictionary, with slight modifications
-.
- # -------------------------------------------------------------------------
--------
- # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation,
- # are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright no
-tice, this
- # list of conditions and the following disclaimer. Redistributions
-in binary
- # form must reproduce the above copyright notice, this list of cond
-itions and
- # the following disclaimer in the documentation and/or other materi
-als
- # provided with the distribution.
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP
-LIED
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA
-BLE FOR
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA
-MAGES
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
-ES;
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A
-ND ON
- # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- # -------------------------------------------------------------------------
--------
-
- 4. Burmese Word Break Dictionary Data (burmesedict.txt)
-
- # Copyright (c) 2014 International Business Machines Corporation
- # and others. All Rights Reserved.
- #
- # This list is part of a project hosted at:
- # github.com/kanyawtech/myanmar-karen-word-lists
- #
- # -------------------------------------------------------------------------
--------
- # Copyright (c) 2013, LeRoy Benjamin Sharon
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation,
- # are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright notice,
-this
- # list of conditions and the following disclaimer.
- #
- # Redistributions in binary form must reproduce the above copyright notic
-e, this
- # list of conditions and the following disclaimer in the documentation an
-d/or
- # other materials provided with the distribution.
- #
- # Neither the name Myanmar Karen Word Lists, nor the names of its
- # contributors may be used to endorse or promote products derived from
- # this software without specific prior written permission.
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP
-LIED
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA
-BLE FOR
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA
-MAGES
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
-ES;
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A
-ND ON
- # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- # -------------------------------------------------------------------------
--------
-
- 5. Time Zone Database
-
- ICU uses the public domain data and code derived from Time Zone Database
- for its time zone support. The ownership of the TZ database is explained
- in BCP 175: Procedure for Maintaining the Time Zone Database section 7.
-
-7. Database Ownership
-
- The TZ database itself is not an IETF Contribution or an IETF
- document. Rather it is a pre-existing and regularly updated work
- that is in the public domain, and is intended to remain in the public
- domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply
- to the TZ Database or contributions that individuals make to it.
- Should any claims be made and substantiated against the TZ Database,
- the organization that is providing the IANA Considerations defined in
- this RFC, under the memorandum of understanding with the IETF,
- currently ICANN, may act in accordance with all competent court
- orders. No ownership claims will be made by ICANN or the IETF Trust
- on the database or the code. Any person making a contribution to the
- database or code waives all rights to future claims in that
- contribution or in the TZ Database.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ijar.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title ijar
-
-\l{https://github.com/google/bazel/tree/master/third_party/ijar}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-jsoncpp.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title jsoncpp
-
-\l{https://github.com/open-source-parsers/jsoncpp}{Project Homepage}
-
-\badcode
-The JsonCpp library's source code, including accompanying documentation,
-tests and demonstration applications, are licensed under the following
-conditions...
-
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all
-jurisdictions which recognize such a disclaimer. In such jurisdictions,
-this software is released into the Public Domain.
-
-In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
-released under the terms of the MIT License (see below).
-
-In jurisdictions which recognize Public Domain property, the user of this
-software may choose to accept it either as 1) Public Domain, 2) under the
-conditions of the MIT License (see below), or 3) under the terms of dual
-Public Domain/MIT License conditions described here, as they choose.
-
-The MIT License is about as close to Public Domain as a license can get, and is
-described in clear, concise terms at:
-
- http://en.wikipedia.org/wiki/MIT_License
-
-The full text of the MIT License follows:
-
-========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-========================================================================
-(END LICENSE TEXT)
-
-The MIT license is compatible with both the GPL and commercial
-software, affording one all of the rights of Public Domain with the
-minor nuisance of being required to keep the above copyright notice
-and license text in the source code. Note also that by accepting the
-Public Domain "license" you can re-license your copy using whatever
-license you like.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libevent.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libevent
-
-\l{http://libevent.org/}{Project Homepage}
-
-\badcode
-Libevent is available for use under the following license, commonly known
-as the 3-clause (or "modified") BSD license:
-
-==============================
-Copyright (c) 2000-2007 Niels Provos &lt;provos@citi.umich.edu&gt;
-Copyright (c) 2007-2010 Niels Provos and Nick Mathewson
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-==============================
-
-Portions of Libevent are based on works by others, also made available by
-them under the three-clause BSD license above. The copyright notices are
-available in the corresponding source files; the license is as above. Here's
-a list:
-
-log.c:
- Copyright (c) 2000 Dug Song &lt;dugsong@monkey.org&gt;
- Copyright (c) 1993 The Regents of the University of California.
-
-strlcpy.c:
- Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
-
-win32.c:
- Copyright (c) 2003 Michael A. Davis &lt;mike@datanerds.net&gt;
-
-evport.c:
- Copyright (c) 2007 Sun Microsystems
-
-min_heap.h:
- Copyright (c) 2006 Maxim Yegorushkin &lt;maxim.yegorushkin@gmail.com&gt;
-
-tree.h:
- Copyright 2002 Niels Provos &lt;provos@citi.umich.edu&gt;
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libexif.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libexif
-
-\l{http://libexif.sourceforge.net/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjingle.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libjingle
-
-\l{http://www.webrtc.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2013, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
-WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjpeg.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title libjpeg
-
-\l{http://www.ijg.org/}{Project Homepage}
-
-\badcode
-(Copied from the README.)
-
---------------------------------------------------------------------------------
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it. (See the file
-ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh). Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&amp;T, and Mitsubishi. Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses. For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs". This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
- "The Graphics Interchange Format(c) is the Copyright property of
- CompuServe Incorporated. GIF(sm) is a Service Mark property of
- CompuServe Incorporated."
-
---------------------------------------------------------------------------------
-
-jconfig.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-jmorecfg.h contains modifications, which are distributed under the Netscape
-Public License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjpeg-turbo.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title libjpeg-turbo
-
-\l{http://sourceforge.net/projects/libjpeg-turbo/}{Project Homepage}
-
-\badcode
-libjpeg-turbo is licensed under a non-restrictive, BSD-style license
-(see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and
-associated test programs bear a similar license, which is reproduced below:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-- Neither the name of the libjpeg-turbo Project nor the names of its
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libpng.html
-\ingroup qtwebengine-licensing
-\brief libpng license
-\title libpng
-
-\l{http://libpng.org/}{Project Homepage}
-
-\badcode
-
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-pngusr.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-This code is released under the libpng license.
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.54, November 12, 2015, are
-Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
-derived from libpng-1.0.6, and are distributed according to the same
-disclaimer and license as libpng-1.0.6 with the following individuals
-added to the list of Contributing Authors:
-
- Simon-Pierre Cadieux
- Eric S. Raymond
- Cosmin Truta
- Gilles Vollant
-
-and with the following additions to the disclaimer:
-
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
-
-libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
-libpng-0.96, and are distributed according to the same disclaimer and
-license as libpng-0.96, with the following individuals added to the list
-of Contributing Authors:
-
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
-
-libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
-and are distributed according to the same disclaimer and license as
-libpng-0.88, with the following individuals added to the list of
-Contributing Authors:
-
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
-
-libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
-
-For the purposes of this copyright and license, "Contributing Authors"
-is defined as the following set of individuals:
-
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-source code, or portions hereof, for any purpose, without fee, subject
-to the following restrictions:
-
- 1. The origin of this source code must not be misrepresented.
-
- 2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
- 3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
- printf("%s", png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
-a certification mark of the Open Source Initiative. OSI has not addressed
-the additional disclaimers inserted at version 1.0.7.
-
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-November 12, 2015
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libsecret.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libsecret
-
-\l{https://git.gnome.org/browse/libsecret/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libsrtp.html
-\ingroup qtwebengine-licensing
-\brief 3-clause BSD
-\title libsrtp
-
-\l{https://github.com/cisco/libsrtp}{Project Homepage}
-
-\badcode
-/*
- *
- * Copyright (c) 2001-2006 Cisco Systems, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * Neither the name of the Cisco Systems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libudev.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libudev
-
-\l{http://www.freedesktop.org/wiki/Software/systemd/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libusbx.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libusbx
-
-\l{http://libusb.org}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libva.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libva
-
-\l{http://freedesktop.org/wiki/Software/vaapi}{Project Homepage}
-
-\badcode
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sub license, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice (including the
- next paragraph) shall be included in all copies or substantial portions
- of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libvpx.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libvpx
-
-\l{http://www.webmproject.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, The WebM Project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google, nor the WebM Project, nor the names
- of its contributors may be used to endorse or promote products
- derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libxml.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libxml
-
-\l{http://xmlsoft.org}{Project Homepage}
-
-\badcode
-Except where otherwise noted in the source code (e.g. the files hash.c,
-list.c and the trio files, which are covered by a similar licence but
-with different Copyright notices) all the files are:
-
- Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libxslt.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libxslt
-
-\l{http://xmlsoft.org/XSLT}{Project Homepage}
-
-\badcode
-Licence for libxslt except libexslt
-----------------------------------------------------------------------
- Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Daniel Veillard shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from him.
-
-----------------------------------------------------------------------
-
-Licence for libexslt
-----------------------------------------------------------------------
- Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard.
- All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the authors shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from him.
-----------------------------------------------------------------------
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libyuv.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libyuv
-
-\l{http://code.google.com/p/libyuv/}{Project Homepage}
-
-\badcode
-Copyright 2011 The LibYuv Project Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-linux-syscall-support.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title linux-syscall-support
-
-\l{http://code.google.com/p/linux-syscall-support/}{Project Homepage}
-
-\badcode
-// Copyright 2015 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mach_override.html
-\ingroup qtwebengine-licensing
-\brief MIT and 2-clause BSD
-\title mach_override
-
-\l{https://github.com/rentzsch/mach_override}{Project Homepage}
-
-\badcode
-Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com
-Some rights reserved: http://opensource.org/licenses/mit
-
-mach_override includes a copy of libudis86, licensed as follows:
-
-Copyright (c) 2002-2009 Vivek Thampi
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mesa.html
-\ingroup qtwebengine-licensing
-\brief MIT and LGPL v2
-\title mesa
-
-\l{http://www.mesa3d.org/}{Project Homepage}
-
-\badcode
-The default Mesa license is as follows:
-
-Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-Some parts of Mesa are copyrighted under the GNU LGPL. See the
-Mesa/docs/COPYRIGHT file for details.
-
-The following is the standard GNU copyright file.
-----------------------------------------------------------------------
-
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-minigbm.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title minigbm
-
-\l{https://chromium.googlesource.com/chromiumos/platform/minigbm}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium OS Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-modp-base64-decoder.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title modp base64 decoder
-
-\l{https://github.com/client9/stringencoders}{Project Homepage}
-
-\badcode
- * MODP_B64 - High performance base64 encoder/decoder
- * Version 1.3 -- 17-Mar-2006
- * http://modp.com/release/base64
- *
- * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of the modp.com nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mt19937ar.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title mt19937ar
-
-\l{http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html}{Project Homepage}
-
-\badcode
- A C-program for MT19937, with initialization improved 2002/1/26.
- Coded by Takuji Nishimura and Makoto Matsumoto.
-
- Before using, initialize the state by using init_genrand(seed)
- or init_by_array(init_key, key_length).
-
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The names of its contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ocmock.html
-\ingroup qtwebengine-licensing
-\brief BSD with advertising clause
-\title ocmock
-
-\l{https://github.com/erikdoe/ocmock}{Project Homepage}
-
-\badcode
-
- Copyright (c) 2004-2012 by Mulle Kybernetik. All rights reserved.
-
- Permission to use, copy, modify and distribute this software and its documentation
- is hereby granted, provided that both the copyright notice and this permission
- notice appear in all copies of the software, derivative works or modified versions,
- and any portions thereof, and that both notices appear in supporting documentation,
- and that credit is given to Mulle Kybernetik in all documents and publicity
- pertaining to direct or indirect use of this code or its derivatives.
-
- THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE
- SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS
- "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY
- DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE
- OR OF ANY DERIVATIVE WORK.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-open-vcdiff.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0, MIT, GPL v2 and custom licenses
-\title open-vcdiff
-
-\l{https://github.com/google/open-vcdiff}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2008 The open-vcdiff Authors. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-opus.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title opus
-
-\l{http://git.xiph.org/?p=opus.git}{Project Homepage}
-
-\badcode
-Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
- Jean-Marc Valin, Timothy B. Terriberry,
- CSIRO, Gregory Maxwell, Mark Borgerding,
- Erik de Castro Lopo
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of Internet Society, IETF or IETF Trust, nor the
-names of specific contributors, may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Opus is subject to the royalty-free patent licenses which are
-specified at:
-
-Xiph.Org Foundation:
-https://datatracker.ietf.org/ipr/1524/
-
-Microsoft Corporation:
-https://datatracker.ietf.org/ipr/1914/
-
-Broadcom Corporation:
-https://datatracker.ietf.org/ipr/1526/
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-pyelftools.html
-\ingroup qtwebengine-licensing
-\brief Public Domain
-\title pyelftools
-
-\l{https://bitbucket.org/eliben/pyelftools}{Project Homepage}
-
-\badcode
-pyelftools is in the public domain (see below if you need more details).
-
-pyelftools uses the construct library for structured parsing of a binary
-stream. construct is packaged in pyelftools/construct - see its LICENSE
-file for the license.
-
--------------------------------------------------------------------------------
-
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to &lt;http://unlicense.org/&gt;
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-re2---an-efficient,-principled-regular-expression-library.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title re2 - an efficient, principled regular expression library
-
-\l{https://github.com/google/re2}{Project Homepage}
-
-\badcode
-// Copyright (c) 2009 The RE2 Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-sfntly.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title sfntly
-
-\l{https://github.com/googlei18n/sfntly}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2011 Google Inc. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-simplejson.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title simplejson
-
-\l{https://github.com/simplejson/simplejson}{Project Homepage}
-
-\badcode
-Copyright (c) 2006 Bob Ippolito
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-sqlite.html
-\ingroup qtwebengine-licensing
-\brief Public domain
-\title sqlite
-
-\l{http://sqlite.org/}{Project Homepage}
-
-\badcode
-The author disclaims copyright to this source code. In place of
-a legal notice, here is a blessing:
-
- May you do good and not evil.
- May you find forgiveness for yourself and forgive others.
- May you share freely, never taking more than you give.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-talloc.html
-\ingroup qtwebengine-licensing
-\brief LGPL v3
-\title talloc
-
-\l{http://talloc.samba.org/talloc/doc/html/index.html}{Project Homepage}
-
-\badcode
- Unix SMB/CIFS implementation.
- Samba temporary memory allocation functions
-
- Copyright (C) Andrew Tridgell 2004-2005
- Copyright (C) Stefan Metzmacher 2006
-
- ** NOTE! The following LGPL license applies to the talloc
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-tcmalloc.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title tcmalloc
-
-\l{http://gperftools.googlecode.com/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-tlslite.html
-\ingroup qtwebengine-licensing
-\brief Public domain and BSD
-\title tlslite
-
-\l{http://trevp.net/tlslite/}{Project Homepage}
-
-\badcode
-
-TLS Lite includes code from different sources. All code is either dedicated to
-the public domain by its authors, or available under a BSD-style license. In
-particular:
-
--
-
-Code written by Trevor Perrin, Kees Bos, Sam Rushing, Dimitris Moraitis,
-Marcelo Fernandez, Martin von Loewis, Dave Baggett, and Yngve Pettersen is
-available under the following terms:
-
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or distribute
-this software, either in source code form or as a compiled binary, for any
-purpose, commercial or non-commercial, and by any means.
-
-In jurisdictions that recognize copyright laws, the author or authors of this
-software dedicate any and all copyright interest in the software to the public
-domain. We make this dedication for the benefit of the public at large and to
-the detriment of our heirs and successors. We intend this dedication to be an
-overt act of relinquishment in perpetuity of all present and future rights to
-this software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--
-
-Code written by Bram Cohen (rijndael.py) was dedicated to the public domain by
-its author. See rijndael.py for details.
-
--
-
-Code written by Google is available under the following terms:
-
-Copyright (c) 2008, The Chromium Authors
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of the Google Inc. nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-url_parse.html
-\ingroup qtwebengine-licensing
-\brief BSD and MPL 1.1/GPL 2.0/LGPL 2.1
-\title url_parse
-
-\l{http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp}{Project Homepage}
-
-\badcode
-Copyright 2007, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------------------------------------------------------------------
-
-The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is
-licensed separately as follows:
-
-The contents of this file are subject to the Mozilla Public License Version
-1.1 (the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-http://www.mozilla.org/MPL/
-
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-for the specific language governing rights and limitations under the
-License.
-
-The Original Code is mozilla.org code.
-
-The Initial Developer of the Original Code is
-Netscape Communications Corporation.
-Portions created by the Initial Developer are Copyright (C) 1998
-the Initial Developer. All Rights Reserved.
-
-Contributor(s):
- Darin Fisher (original author)
-
-Alternatively, the contents of this file may be used under the terms of
-either the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-in which case the provisions of the GPL or the LGPL are applicable instead
-of those above. If you wish to allow use of your version of this file only
-under the terms of either the GPL or the LGPL, and not to allow others to
-use your version of this file under the terms of the MPL, indicate your
-decision by deleting the provisions above and replace them with the notice
-and other provisions required by the GPL or the LGPL. If you do not delete
-the provisions above, a recipient may use your version of this file under
-the terms of any one of the MPL, the GPL or the LGPL.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-usrsctp.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title usrsctp
-
-\l{http://github.com/sctplab/usrsctp}{Project Homepage}
-
-\badcode
-(Copied from the COPYRIGHT file of
-https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT)
---------------------------------------------------------------------------------
-
-Copyright (c) 2001, 2002 Cisco Systems, Inc.
-Copyright (c) 2002-12 Randall R. Stewart
-Copyright (c) 2002-12 Michael Tuexen
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-v4l-utils.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title v4l-utils
-
-\l{http://git.linuxtv.org/v4l-utils.git}{Project Homepage}
-
-\badcode
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-^L
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-^L
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-^L
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-^L
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-^L
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-^L
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-^L
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-^L
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James
- Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-valgrind.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title valgrind
-
-\l{http://valgrind.org}{Project Homepage}
-
-\badcode
- Notice that the following BSD-style license applies to the Valgrind header
- files used by Chromium (valgrind.h and memcheck.h). However, the rest of
- Valgrind is licensed under the terms of the GNU General Public License,
- version 2, unless otherwise indicated.
-
- ----------------------------------------------------------------
-
- Copyright (C) 2000-2008 Julian Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-wayland.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title wayland
-
-\l{http://wayland.freedesktop.org/}{Project Homepage}
-
-\badcode
-Copyright © 2008-2012 Kristian Høgsberg
-Copyright © 2010-2012 Intel Corporation
-Copyright © 2011 Benjamin Franzke
-Copyright © 2012 Collabora, Ltd.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
----
-
-The above is the version of the MIT "Expat" License used by X.org:
-
- http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-wayland-protocols.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title wayland-protocols
-
-\l{http://wayland.freedesktop.org/}{Project Homepage}
-
-\badcode
-Copyright © 2008-2013 Kristian Høgsberg
-Copyright © 2010-2013 Intel Corporation
-Copyright © 2013 Rafael Antognolli
-Copyright © 2013 Jasper St. Pierre
-Copyright © 2014 Jonas Ådahl
-Copyright © 2014 Jason Ekstrand
-Copyright © 2014-2015 Collabora, Ltd.
-Copyright © 2015 Red Hat Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
----
-
-The above is the version of the MIT "Expat" License used by X.org:
-
- http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-woff2.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title woff2
-
-\l{https://github.com/google/woff2}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-x86inc.html
-\ingroup qtwebengine-licensing
-\brief ISC from text in file header. Same text is copied to LICENSE file.
-\title x86inc
-
-\l{http://git.videolan.org/?p=x264.git;a=blob;f=common/x86/x86inc.asm}{Project Homepage}
-
-\badcode
-;*****************************************************************************
-;* x86inc.asm
-;*****************************************************************************
-;* Copyright (C) 2005-2011 x264 project
-;*
-;* Authors: Loren Merritt &lt;lorenm@u.washington.edu&gt;
-;* Anton Mitrofanov &lt;BugMaster@narod.ru&gt;
-;* Jason Garrett-Glaser &lt;darkshikari@gmail.com&gt;
-;*
-;* Permission to use, copy, modify, and/or distribute this software for any
-;* purpose with or without fee is hereby granted, provided that the above
-;* copyright notice and this permission notice appear in all copies.
-;*
-;* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;*****************************************************************************
-
-; This is a header file for the x264ASM assembly language, which uses
-; NASM/YASM syntax combined with a large number of macros to provide easy
-; abstraction between different calling conventions (x86_32, win64, linux64).
-; It also has various other useful features to simplify writing the kind of
-; DSP functions that are most often used in x264.
-
-; Unlike the rest of x264, this file is available under an ISC license, as it
-; has significant usefulness outside of x264 and we want it to be available
-; to the largest audience possible. Of course, if you modify it for your own
-; purposes to add a new feature, we strongly encourage contributing a patch
-; as this feature might be useful for others as well. Send patches or ideas
-; to x264-devel@videolan.org .
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-mime.html
-\ingroup qtwebengine-licensing
-\brief Academic Free License version 2.0 or LGPL v2
-\title xdg-mime
-
-\l{http://freedesktop.org}{Project Homepage}
-
-\badcode
-Licensed under the Academic Free License version 2.0 (below)
-Or under the following terms:
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-
-
---------------------------------------------------------------------------------
-Academic Free License v. 2.0
---------------------------------------------------------------------------------
-
-This Academic Free License (the "License") applies to any original work of
-authorship (the "Original Work") whose owner (the "Licensor") has placed the
-following notice immediately following the copyright notice for the Original
-Work:
-
-Licensed under the Academic Free License version 2.0
-1) Grant of Copyright License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license to do the
-following:
-
-a) to reproduce the Original Work in copies;
-b) to prepare derivative works ("Derivative Works") based upon the Original
- Work;
-c) to distribute copies of the Original Work and Derivative Works to the
- public;
-d) to perform the Original Work publicly; and
-e) to display the Original Work publicly.
-
-2) Grant of Patent License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
-claims owned or controlled by the Licensor that are embodied in the Original
-Work as furnished by the Licensor, to make, use, sell and offer for sale the
-Original Work and Derivative Works.
-
-3) Grant of Source Code License. The term "Source Code" means the preferred
-form of the Original Work for making modifications to it and all available
-documentation describing how to modify the Original Work. Licensor hereby
-agrees to provide a machine-readable copy of the Source Code of the Original
-Work along with each copy of the Original Work that Licensor distributes.
-Licensor reserves the right to satisfy this obligation by placing a
-machine-readable copy of the Source Code in an information repository
-reasonably calculated to permit inexpensive and convenient access by You for as
-long as Licensor continues to distribute the Original Work, and by publishing
-the address of that information repository in a notice immediately following
-the copyright notice that applies to the Original Work.
-
-4) Exclusions From License Grant. Neither the names of Licensor, nor the names
-of any contributors to the Original Work, nor any of their trademarks or
-service marks, may be used to endorse or promote products derived from this
-Original Work without express prior written permission of the Licensor. Nothing
-in this License shall be deemed to grant any rights to trademarks, copyrights,
-patents, trade secrets or any other intellectual property of Licensor except as
-expressly stated herein. No patent license is granted to make, use, sell or
-offer to sell embodiments of any patent claims other than the licensed claims
-defined in Section 2. No right is granted to the trademarks of Licensor even if
-such marks are included in the Original Work. Nothing in this License shall be
-interpreted to prohibit Licensor from licensing under different terms from this
-License any Original Work that Licensor otherwise would have a right to
-license.
-
-5) This section intentionally omitted.
-
-6) Attribution Rights. You must retain, in the Source Code of any Derivative
-Works that You create, all copyright, patent or trademark notices from the
-Source Code of the Original Work, as well as any notices of licensing and any
-descriptive text identified therein as an "Attribution Notice." You must cause
-the Source Code for any Derivative Works that You create to carry a prominent
-Attribution Notice reasonably calculated to inform recipients that You have
-modified the Original Work.
-
-7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
-the copyright in and to the Original Work and the patent rights granted herein
-by Licensor are owned by the Licensor or are sublicensed to You under the terms
-of this License with the permission of the contributor(s) of those copyrights
-and patent rights. Except as expressly stated in the immediately proceeding
-sentence, the Original Work is provided under this License on an "AS IS" BASIS
-and WITHOUT WARRANTY, either express or implied, including, without limitation,
-the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
-This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
-license to Original Work is granted hereunder except under this disclaimer.
-
-8) Limitation of Liability. Under no circumstances and under no legal theory,
-whether in tort (including negligence), contract, or otherwise, shall the
-Licensor be liable to any person for any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License
-or the use of the Original Work including, without limitation, damages for loss
-of goodwill, work stoppage, computer failure or malfunction, or any and all
-other commercial damages or losses. This limitation of liability shall not
-apply to liability for death or personal injury resulting from Licensor's
-negligence to the extent applicable law prohibits such limitation. Some
-jurisdictions do not allow the exclusion or limitation of incidental or
-consequential damages, so this exclusion and limitation may not apply to You.
-
-9) Acceptance and Termination. If You distribute copies of the Original Work or
-a Derivative Work, You must make a reasonable effort under the circumstances to
-obtain the express assent of recipients to the terms of this License. Nothing
-else but this License (or another written agreement between Licensor and You)
-grants You permission to create Derivative Works based upon the Original Work
-or to exercise any of the rights granted in Section 1 herein, and any attempt
-to do so except under the terms of this License (or another written agreement
-between Licensor and You) is expressly prohibited by U.S. copyright law, the
-equivalent laws of other countries, and by international treaty. Therefore, by
-exercising any of the rights granted to You in Section 1 herein, You indicate
-Your acceptance of this License and all of its terms and conditions.
-
-10) Termination for Patent Action. This License shall terminate automatically
-and You may no longer exercise any of the rights granted to You by this License
-as of the date You commence an action, including a cross-claim or counterclaim,
-for patent infringement (i) against Licensor with respect to a patent
-applicable to software or (ii) against any entity with respect to a patent
-applicable to the Original Work (but excluding combinations of the Original
-Work with other software or hardware).
-
-11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
-License may be brought only in the courts of a jurisdiction wherein the
-Licensor resides or in which Licensor conducts its primary business, and under
-the laws of that jurisdiction excluding its conflict-of-law provisions. The
-application of the United Nations Convention on Contracts for the International
-Sale of Goods is expressly excluded. Any use of the Original Work outside the
-scope of this License or after its termination shall be subject to the
-requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq.,
-the equivalent laws of other countries, and international treaty. This section
-shall survive the termination of this License.
-
-12) Attorneys Fees. In any action to enforce the terms of this License or
-seeking damages relating thereto, the prevailing party shall be entitled to
-recover its costs and expenses, including, without limitation, reasonable
-attorneys' fees and costs incurred in connection with such action, including
-any appeal of such action. This section shall survive the termination of this
-License.
-
-13) Miscellaneous. This License represents the complete agreement concerning
-the subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent necessary to
-make it enforceable.
-
-14) Definition of "You" in This License. "You" throughout this License, whether
-in upper or lower case, means an individual or a legal entity exercising rights
-under, and complying with all of the terms of, this License. For legal
-entities, "You" includes any entity that controls, is controlled by, or is
-under common control with you. For purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty percent
-(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
-entity.
-
-15) Right to Use. You may use the Original Work in all ways not otherwise
-restricted or conditioned by this License or by law, and Licensor promises not
-to interfere with or be responsible for such uses by You.
-
-This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved.
-Permission is hereby granted to copy and distribute this license without
-modification. This license may not be modified without the express written
-permission of its copyright owner.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-user-dirs.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title xdg-user-dirs
-
-\l{http://www.freedesktop.org/wiki/Software/xdg-user-dirs}{Project Homepage}
-
-\badcode
- Copyright (c) 2007 Red Hat, inc
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-utils.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title xdg-utils
-
-\l{http://portland.freedesktop.org/wiki/}{Project Homepage}
-
-\badcode
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-yasm.html
-\ingroup qtwebengine-licensing
-\brief 2-clause or 3-clause BSD licensed, with the exception of bitvect, which is triple-licensed under the Artistic license, GPL, and LGPL
-\title yasm
-
-\l{http://www.tortall.net/projects/yasm/}{Project Homepage}
-
-\badcode
-Yasm is Copyright (c) 2001-2010 Peter Johnson and other Yasm developers.
-
-Yasm developers and/or contributors include:
- Peter Johnson
- Michael Urman
- Brian Gladman (Visual Studio build files, other fixes)
- Stanislav Karchebny (options parser)
- Mathieu Monnier (SSE4 instruction patches, NASM preprocessor additions)
- Anonymous "NASM64" developer (NASM preprocessor fixes)
- Stephen Polkowski (x86 instruction patches)
- Henryk Richter (Mach-O object format)
- Ben Skeggs (patches, bug reports)
- Alexei Svitkine (GAS preprocessor)
- Samuel Thibault (TASM parser and frontend)
-
------------------------------------
-Yasm licensing overview and summary
------------------------------------
-
-Note: This document does not provide legal advice nor is it the actual
-license of any part of Yasm. See the individual licenses for complete
-details. Consult a lawyer for legal advice.
-
-The primary license of Yasm is the 2-clause BSD license. Please use this
-license if you plan on submitting code to the project.
-
-Yasm has absolutely no warranty; not even for merchantibility or fitness
-for a particular purpose.
-
--------
-Libyasm
--------
-Libyasm is 2-clause or 3-clause BSD licensed, with the exception of
-bitvect, which is triple-licensed under the Artistic license, GPL, and
-LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also
-means that libyasm is free for binary-only distribution as long as the
-terms of the 3-clause BSD license and Artistic license (as it applies to
-bitvect) are fulfilled.
-
--------
-Modules
--------
-The modules are 2-clause or 3-clause BSD licensed.
-
----------
-Frontends
----------
-The frontends are 2-clause BSD licensed.
-
--------------
-License Texts
--------------
-The full text of all licenses are provided in separate files in the source
-distribution. Each source file may include the entire license (in the case
-of the BSD and Artistic licenses), or may reference the GPL or LGPL license
-file.
-
-BSD.txt - 2-clause and 3-clause BSD licenses
-Artistic.txt - Artistic license
-GNU_GPL-2.0 - GNU General Public License
-GNU_LGPL-2.0 - GNU Library General Public License
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-zlib.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title zlib
-
-\l{http://zlib.net/}{Project Homepage}
-
-\badcode
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.4, March 14th, 2010
-
- Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly
- Mark Adler
-
-* /
-
-mozzconf.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-\endcode
-*/
-
-
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 62a09bb91..647f1030b 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -31,7 +31,7 @@
\brief Summarizes Qt WebEngine features.
- Qt WebEngine supports the following Chromium features:
+ Qt WebEngine supports the following features:
\list
\li \l{Audio and Video Codecs}
@@ -40,8 +40,11 @@
\li \l{Fullscreen}
\li \l{HTML5 DRM}
\li \l{HTML5 Geolocation}
+ \li \l{Native Dialogs}
\li \l{Pepper Plugin API}
\li \l{Print to PDF}
+ \li \l{Spellchecker}
+ \li \l{View Source}
\li \l{WebRTC}
\endlist
@@ -140,6 +143,40 @@
Support for this feature was added in Qt 5.5.0.
+ \section1 Native Dialogs
+
+ A web page might request dialogs for the following functions:
+
+ \list
+ \li Entering user credentials for HTTP and proxy authentication
+ \li Displaying JavaScript alerts, confirmation dialogs, and prompts
+ \li Picking colors
+ \li Selecting files
+ \li Displaying form validation messages
+ \endlist
+
+ Qt WebEngine provides standard dialogs for these functions. In widget-based
+ applications, the standard dialogs are based on QDialog, whereas in Qt Quick
+ applications, they can be based either on Qt Quick Controls 1 or Qt Quick
+ Controls 2 (since Qt 5.8). The latter are used only on \c eglfs platforms.
+
+ To explicitly force either dialogs based on Qt Quick Controls 1 or Qt Quick
+ Controls 2, set the \c QTWEBENGINE_DIALOG_SET environment variable to either
+ \c{QtQuickControls1} or \c{QtQuickControls2}.
+
+ Qt WebEngine Widgets dialogs can be customized by reimplementing the
+ QWebEnginePage::chooseFiles(), QWebEnginePage::javaScriptAlert(),
+ QWebEnginePage::javaScriptConfirm(), and QWebEnginePage::javaScriptPrompt()
+ functions.
+
+ Since Qt 5.8, Qt Quick dialogs can be customized by connecting to the
+ WebEngineView::authenticationDialogRequested(),
+ WebEngineView::javaScriptDialogRequested(),
+ WebEngineView::colorDialogRequested(),
+ WebEngineView::fileDialogRequested(), and
+ WebEngineView::formValidationMessageRequested() signals. For an example,
+ see \l{WebEngine Qt Quick Custom Dialogs Example}.
+
\section1 Pepper Plugin API
Qt WebEngine supports loading Pepper Plugin API (PPAPI) plugins if
@@ -223,6 +260,76 @@
Support for this feature was added in Qt 5.7.0.
+ \section1 Spellchecker
+
+ Qt WebEngine supports integrating spellchecking support into HTML forms to
+ enable users to submit spellchecked messages. When the user clicks on
+ an underlined misspelled word, the default context menu displays up to four
+ suggestions. Selecting one will replace the misspelled word.
+
+ To be able to check the spelling, the spellchecker needs dictionaries. It
+ supports dictionaries from the \l{Hunspell project}, but they have to be
+ compiled into a special binary format. A Hunspell dictionary consists of two
+ files:
+
+ \list
+
+ \li A \c .dic file that is a dictionary containing words for the
+ language
+ \li An \c .aff file that defines the meaning of special flags in the
+ dictionary
+ \endlist
+
+ These two files can be converted into the \c bdic format by using the
+ \c qwebengine_convert_dict tool that is shipped together with Qt.
+ When the Qt WebEngine spellchecker initializes, it will try to load the
+ \c bdict dictionaries and to check them for consistency. First, it searches
+ \e qtwebengine_dictionaries directories relative to the executable,
+ then it will look in \c QT_INSTALL_PREFIX/qtwebengines_dictionaries.
+
+ Spellchecking is disabled by default and can be enabled per profile by
+ using the QWebEngineProfile::setSpellCheckEnabled() method in widget-based
+ applications and the \l {QQuickWebEngineProfile::spellCheckEnabled}
+ {WebEngineProfile.spellCheckEnabled} property in Qt Quick applications.
+
+ The current language used for spellchecking is defined per profile, and can
+ be set using the QWebEngineProfile::setSpellCheckLanguages() method or the
+ \l {QQuickWebEngineProfile::spellCheckLanguages}
+ {WebEngineProfile.spellCheckLanguages} property.
+
+ This feature can be tested by building and running the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+ Support for this feature was added in Qt 5.8.0.
+
+ \section1 View Source
+
+ Qt WebEngine supports viewing the HTML source of a web page.
+
+ This feature can be used from custom menus or assigned to custom events.
+ For more information, see WebEngineView::WebAction, and QWebEnginePage::WebAction.
+
+ This feature can be tested by opening a web page in \l{WebEngine Widgets
+ Simple Browser Example}{Simple Browser} or \l{WebEngine Quick Nano Browser}
+ {Nano Browser}, and then selecting \c{Page Source} in the context menu. The
+ \c{Page Source} context menu entry opens the source view in a new tab.
+
+ For opening the source view in the current tab, URLs with \l{view-source URI scheme}
+ are also supported. For example, you can type the following URL to the URL bar
+ to view the HTML source of the qt.io web page:
+ \code
+ view-source:https://www.qt.io/
+ \endcode
+
+ Auto-completion of incomplete URLs with \l{view-source URI scheme} makes the usage of
+ this feature more comfortable. For example, the following incomplete URL also loads
+ the source view of the qt.io web page:
+ \code
+ view-source:qt.io
+ \endcode
+
+ Support for this feature was added in Qt 5.8.0.
+
\section1 WebRTC
WebRTC provides browsers with Real-Time Communications (RTC) capabilities
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index c4be591ff..bd6cc9a32 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebengine-index.html
\title Qt WebEngine
- \ingroup modules
\brief Provides functionality for rendering regions of dynamic web content.
diff --git a/src/webengine/doc/src/qtwebengine-module.qdoc b/src/webengine/doc/src/qtwebengine-module.qdoc
new file mode 100644
index 000000000..97657f6a9
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-module.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtWebEngine
+ \title Qt WebEngine C++ Classes
+ \brief Exposes C++ functionality to Qt Quick.
+ \ingroup modules
+
+ The Qt WebEngine module exposes C++ functionality to Qt Quick.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet qtwebengine_build_snippet.qdoc 1
+
+ To link against the module, add the following to your qmake project file:
+
+ \snippet qtwebengine_build_snippet.qdoc 0
+*/
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 6c05b2e48..6995be2fa 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -181,7 +181,8 @@
script to run, the injection point, and the world where the script is run. This enables
accessing the DOM to manipulate it within a world.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
\section1 Managing Certificates
@@ -196,9 +197,11 @@
\section1 Proxy Support
- If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise,
- Qt WebEngine automatically picks up the proxy configuration from \macos and Windows. On Linux,
- it acknowledges settings from KDE and Gnome.
+ Qt WebEngine uses the proxy settings from \l{Qt Network}. If
+ QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine, and if
+ QNetworkProxy::usesSystemConfiguration() is enabled, the proxy settings are automatically
+ retrieved from the system. Settings from an installed QNetworkProxyFactory will be ignored
+ though.
If a proxy requires authentication, QWebEnginePage::proxyAuthenticationRequired is emitted.
For Qt Quick, a dialog is shown.
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 765295d30..c5ebe0f06 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -105,7 +105,7 @@
\list
\li \macos 10.9 or later
- \li Xcode 6.1 or later
+ \li Xcode 5.1 or later
\li \macos 10.10 SDK or later
\endlist
@@ -114,7 +114,7 @@
\section1 Mac App Store Compatibility
- By default, Qt WebEngine uses private OS X API, which might cause an application to be
+ By default, Qt WebEngine uses private \macos API, which might cause an application to be
rejected when submitted to the Mac App Store. To configure Qt WebEngine not to use these API
calls, Qt WebEngine has to be recompiled:
@@ -125,10 +125,10 @@
However, this will cause some behavioral changes, such as:
\list
- \li The OS X Kill Ring functionality will no longer work (emacs-like copy pasting).
+ \li The \macos Kill Ring functionality will no longer work (emacs-like copy pasting).
\li Certain Chromium sandboxing cleanup is not done.
\li Text areas will be painted with a different style.
- \li Text fields might be painted with a different style on Mountain Lion (OS X 10.8).
+ \li Text fields might be painted with a different style on Mountain Lion (\macos 10.8).
\endlist
\section1 Default QSurfaceFormat OpenGL Profile Support
diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
index 8549e7664..c67851a2a 100644
--- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
+++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
@@ -24,7 +24,7 @@
*/
/*!
- \qmlmodule QtWebEngine 1.3
+ \qmlmodule QtWebEngine 1.4
\title Qt WebEngine QML Types
\brief Provides QML types for rendering web content within a QML application
\ingroup qtwebengine-modules
@@ -34,7 +34,7 @@
your .qml file:
\badcode
- import QtWebEngine 1.3
+ import QtWebEngine 1.4
\endcode
To link against the module, add the following QT variable to your qmake .pro
diff --git a/src/webengine/doc/src/qwebengine-licensing.qdoc b/src/webengine/doc/src/qwebengine-licensing.qdoc
index c31bd9dac..a7642df5a 100644
--- a/src/webengine/doc/src/qwebengine-licensing.qdoc
+++ b/src/webengine/doc/src/qwebengine-licensing.qdoc
@@ -17,7 +17,7 @@ Third party licenses included in the sources are:
/*!
\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-chromium-global.html
+\page qtwebengine-3rdparty-chromium-global.html attribution
\ingroup qtwebengine-licensing
\title Chromium License
\brief BSD
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index b72e405a8..418da9f9d 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -82,7 +82,11 @@
described by \l FindFlags.
The \l setActiveFocusOnPress() method can be used to create a UI element that should not get
- focus. This can be useful in a hybrid UI.
+ focus on press. This can be useful in a hybrid UI.
+
+ The \l {WebEngineSettings::focusOnNavigationEnabled} {focusOnNavigationEnabled} setting can be
+ used to stop the view from automatically receiving focus when a navigation operation occurs
+ (like loading or reloading a page or navigating through history).
The \l linkHovered() signal is emitted when a mouse pointer passes over a link and thus
corresponds to the \c{mouseover} DOM event.
@@ -481,7 +485,7 @@
a web engine view can be used to create a UI element that should not get focus. This can be
useful in a hybrid UI.
- \sa activeFocusOnPressChanged()
+ \sa activeFocusOnPressChanged, WebEngineSettings::focusOnNavigationEnabled
*/
/*!
@@ -802,6 +806,8 @@
Exit the fullscreen mode. (Added in Qt 5.6)
\value WebEngineView.SavePage
Save the current web page to disk. (Added in Qt 5.7)
+ \value WebEngineView.ViewSource
+ Show the source of the current page in a new tab. (Added in Qt 5.8)
\omitvalue WebActionCount
*/
@@ -1035,7 +1041,7 @@
ApplicationWindow {
id: window
WebEngineView {
- onFullScreenRequested: {
+ onFullScreenRequested: function(request) {
if (request.toggleOn)
window.showFullScreen()
else
@@ -1139,3 +1145,87 @@
Also if the audio is paused, this signal is emitted with an approximate \b{2 second
delay}, from the moment the audio is paused.
*/
+
+/*!
+ \qmlsignal WebEngineView::authenticationDialogRequested(AuthenticationDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when an authentication dialog is requested.
+
+ The request can be handled by using the methods of the AuthenticationDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ AuthenticationDialogRequest::dialogAccept() or AuthenticationDialogRequest::dialogReject()
+ afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::javaScriptDialogRequested(JavaScriptDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a JavaScript dialog is requested.
+
+ The request can be handled by using the methods of the JavaScriptDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ JavaScriptDialogRequest::dialogAccept() or JavaScriptDialogRequest::dialogReject()
+ afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::colorDialogRequested(ColorDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a color picker dialog is requested.
+
+ The request can be handled by using the methods of the ColorDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ ColorDialogRequest::dialogAccept() or ColorDialogRequest::dialogReject() afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::fileDialogRequested(FileDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a file picker dialog is requested.
+
+ The request error can be handled by using the methods of the FileDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either FileDialogRequest::dialogAccept()
+ or FileDialogRequest::dialogReject() afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::formValidationMessageRequested(FormValidationMessageRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a validation message is requested.
+
+ The request can be handled by using the methods of the FormValidationMessageRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up.
+*/
+
+/*!
+ \qmlsignal WebEngineView::contextMenuRequested(ContextMenuRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a context menu is requested.
+
+ The request can be handled by using the properties of the ContextMenuRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default context menu from showing up.
+*/
diff --git a/src/webengine/plugin/dependencies.json b/src/webengine/plugin/dependencies.json
new file mode 100644
index 000000000..115ba72e7
--- /dev/null
+++ b/src/webengine/plugin/dependencies.json
@@ -0,0 +1,7 @@
+[
+ {
+ "name": "QtQuick",
+ "type": "module",
+ "version": "2.6"
+ }
+]
diff --git a/src/webengine/plugin/experimental/experimental.pro b/src/webengine/plugin/experimental/experimental.pro
deleted file mode 100644
index d1b59326a..000000000
--- a/src/webengine/plugin/experimental/experimental.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-CXX_MODULE = qml
-TARGET = qtwebengineexperimentalplugin
-TARGETPATH = QtWebEngine/experimental
-IMPORT_VERSION = 1.0
-
-QT += webengine qml quick
-QT_PRIVATE += webengine-private
-
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
-
-SOURCES = plugin.cpp
-
-load(qml_plugin)
diff --git a/src/webengine/plugin/experimental/plugin.cpp b/src/webengine/plugin/experimental/plugin.cpp
deleted file mode 100644
index c45bcee43..000000000
--- a/src/webengine/plugin/experimental/plugin.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWebEngine module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/qqmlextensionplugin.h>
-
-#include "qquickwebengineview_p.h"
-#include "qquickwebengineview_p_p.h"
-#include "qquickwebenginecontextmenudata_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickWebEngineViewExperimentalExtension : public QObject {
- Q_OBJECT
- Q_PROPERTY(QQuickWebEngineViewExperimental* experimental READ experimental CONSTANT FINAL)
-public:
- QQuickWebEngineViewExperimentalExtension(QObject *parent = 0) : QObject(parent) { }
- QQuickWebEngineViewExperimental* experimental() { return static_cast<QQuickWebEngineView*>(parent())->d_func()->experimental(); }
-};
-
-class QtWebEngineExperimentalPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
-public:
- virtual void registerTypes(const char *uri)
- {
- qWarning("\nWARNING: This project is using the experimental QML API extensions for QtWebEngine and is therefore tied to a specific QtWebEngine release.\n"
- "WARNING: The experimental API will change from version to version, or even be removed. You have been warned!\n");
-
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine.experimental"));
-
- qmlRegisterExtendedType<QQuickWebEngineView, QQuickWebEngineViewExperimentalExtension>(uri, 1, 0, "WebEngineView");
- qmlRegisterUncreatableType<QQuickWebEngineViewExperimental>(uri, 1, 0, "WebEngineViewExperimental",
- tr("Cannot create a separate instance of WebEngineViewExperimental"));
- qmlRegisterUncreatableType<QQuickWebEngineViewport>(uri, 1, 0, "WebEngineViewport",
- tr("Cannot create a separate instance of WebEngineViewport"));
- qmlRegisterUncreatableType<const QQuickWebEngineContextMenuData>(uri, 1, 0, "WebEngineContextMenuData",
- tr("Cannot create a separate instance of WebEngineContextMenuData"));
-
- // Use the latest revision of QQuickWebEngineView when importing QtWebEngine.experimental 1.0
- qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, 0);
- }
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/webengine/plugin/experimental/qmldir b/src/webengine/plugin/experimental/qmldir
deleted file mode 100644
index 56ad22e70..000000000
--- a/src/webengine/plugin/experimental/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module QtWebEngine.experimental
-plugin qtwebengineexperimentalplugin
-typeinfo plugins.qmltypes
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index 4809c0708..0fd2087d4 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -41,6 +41,8 @@
#include <QtWebEngine/QQuickWebEngineProfile>
#include "qquickwebenginecertificateerror_p.h"
+#include "qquickwebenginecontextmenurequest_p.h"
+#include "qquickwebenginedialogrequests_p.h"
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebenginehistory_p.h"
#include "qquickwebenginefaviconprovider_p_p.h"
@@ -62,7 +64,7 @@ static QObject *webEngineSingletonProvider(QQmlEngine *, QJSEngine *)
class QtWebEnginePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
virtual void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE
{
@@ -75,27 +77,32 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine"));
qmlRegisterType<QQuickWebEngineView>(uri, 1, 0, "WebEngineView");
- qmlRegisterUncreatableType<QQuickWebEngineLoadRequest>(uri, 1, 0, "WebEngineLoadRequest", tr("Cannot create separate instance of WebEngineLoadRequest"));
- qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 1, 0, "WebEngineNavigationRequest", tr("Cannot create separate instance of WebEngineNavigationRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineLoadRequest>(uri, 1, 0, "WebEngineLoadRequest", msgUncreatableType("WebEngineLoadRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 1, 0, "WebEngineNavigationRequest", msgUncreatableType("WebEngineNavigationRequest"));
qmlRegisterType<QQuickWebEngineView, 1>(uri, 1, 1, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 2>(uri, 1, 2, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 3>(uri, 1, 3, "WebEngineView");
+ qmlRegisterType<QQuickWebEngineView, 4>(uri, 1, 4, "WebEngineView");
qmlRegisterType<QQuickWebEngineProfile>(uri, 1, 1, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 1>(uri, 1, 2, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 2>(uri, 1, 3, "WebEngineProfile");
+ qmlRegisterType<QQuickWebEngineProfile, 3>(uri, 1, 4, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineScript>(uri, 1, 1, "WebEngineScript");
- qmlRegisterUncreatableType<QQuickWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", tr("Cannot create separate instance of WebEngineCertificateError"));
+ qmlRegisterUncreatableType<QQuickWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", msgUncreatableType("WebEngineCertificateError"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem>(uri, 1, 1, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 1>(uri, 1, 2, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 2>(uri, 1, 3, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
- qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", tr("Cannot create separate instance of WebEngineNewViewRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 3>(uri, 1, 4, "WebEngineDownloadItem",
+ tr("Cannot create a separate instance of WebEngineDownloadItem"));
+ qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", msgUncreatableType("WebEngineNewViewRequest"));
qmlRegisterUncreatableType<QQuickWebEngineSettings>(uri, 1, 1, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 1>(uri, 1, 2, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 2>(uri, 1, 3, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
+ qmlRegisterUncreatableType<QQuickWebEngineSettings, 3>(uri, 1, 4, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterSingletonType<QQuickWebEngineSingleton>(uri, 1, 1, "WebEngine", webEngineSingletonProvider);
qmlRegisterUncreatableType<QQuickWebEngineHistory>(uri, 1, 1, "NavigationHistory",
tr("Cannot create a separate instance of NavigationHistory"));
@@ -104,9 +111,28 @@ public:
qmlRegisterUncreatableType<QQuickWebEngineFullScreenRequest>(uri, 1, 1, "FullScreenRequest",
tr("Cannot create a separate instance of FullScreenRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineContextMenuRequest>(uri, 1, 4, "ContextMenuRequest",
+ msgUncreatableType("ContextMenuRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineAuthenticationDialogRequest>(uri, 1, 4, "AuthenticationDialogRequest",
+ msgUncreatableType("AuthenticationDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineJavaScriptDialogRequest>(uri, 1, 4, "JavaScriptDialogRequest",
+ msgUncreatableType("JavaScriptDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineColorDialogRequest>(uri, 1, 4, "ColorDialogRequest",
+ msgUncreatableType("ColorDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineFileDialogRequest>(uri, 1, 4, "FileDialogRequest",
+ msgUncreatableType("FileDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineFormValidationMessageRequest>(uri, 1, 4, "FormValidationMessageRequest",
+ msgUncreatableType("FormValidationMessageRequest"));
+
// For now (1.x import), the latest revision matches the minor version of the import.
qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, LATEST_WEBENGINEVIEW_REVISION);
}
+
+private:
+ static QString msgUncreatableType(const char *className)
+ {
+ return tr("Cannot create separate instance of %1").arg(QLatin1String(className));
+ }
};
QT_END_NAMESPACE
diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro
index 2fbadfc97..56eb7bd3c 100644
--- a/src/webengine/plugin/plugin.pro
+++ b/src/webengine/plugin/plugin.pro
@@ -1,7 +1,7 @@
CXX_MODULE = qml
TARGET = qtwebengineplugin
TARGETPATH = QtWebEngine
-IMPORT_VERSION = 1.3
+IMPORT_VERSION = 1.4
QT += webengine qml quick
QT_PRIVATE += webengine-private
diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
index 23ba77235..48a572866 100644
--- a/src/webengine/plugin/plugins.qmltypes
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -4,24 +4,35 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -defaultplatform QtWebEngine 1.3'
+// 'qmlplugindump -defaultplatform -dependencies dependencies.json -nonrelocatable QtWebEngine 1.4'
Module {
- dependencies: [
- "Qt.labs.folderlistmodel 2.1",
- "Qt.labs.settings 1.0",
- "QtGraphicalEffects 1.0",
- "QtQml.Models 2.2",
- "QtQuick 2.6",
- "QtQuick.Controls 1.5",
- "QtQuick.Controls.Styles 1.4",
- "QtQuick.Dialogs 1.2",
- "QtQuick.Extras 1.4",
- "QtQuick.Extras.Private.CppUtils 1.1",
- "QtQuick.Layouts 1.1",
- "QtQuick.PrivateWidgets 1.1",
- "QtQuick.Window 2.2"
- ]
+ dependencies: ["QtQuick 2.6"]
+ Component {
+ name: "QQuickWebEngineAuthenticationDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/AuthenticationDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "AuthenticationType"
+ values: {
+ "AuthenticationTypeHTTP": 0,
+ "AuthenticationTypeProxy": 1
+ }
+ }
+ Property { name: "url"; type: "QUrl"; isReadonly: true }
+ Property { name: "realm"; type: "string"; isReadonly: true }
+ Property { name: "proxyHost"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "AuthenticationType"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "user"; type: "string" }
+ Parameter { name: "password"; type: "string" }
+ }
+ Method { name: "dialogReject" }
+ }
Component {
name: "QQuickWebEngineCertificateError"
prototype: "QObject"
@@ -43,7 +54,9 @@ Module {
"CertificateWeakSignatureAlgorithm": -208,
"CertificateNonUniqueName": -210,
"CertificateWeakKey": -211,
- "CertificateNameConstraintViolation": -212
+ "CertificateNameConstraintViolation": -212,
+ "CertificateValidityTooLong": -213,
+ "CertificateTransparencyRequired": -214
}
}
Property { name: "url"; type: "QUrl"; isReadonly: true }
@@ -55,15 +68,60 @@ Module {
Method { name: "rejectCertificate" }
}
Component {
+ name: "QQuickWebEngineColorDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/ColorDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Method { name: "dialogReject" }
+ }
+ Component {
+ name: "QQuickWebEngineContextMenuRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/ContextMenuRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "MediaType"
+ values: {
+ "MediaTypeNone": 0,
+ "MediaTypeImage": 1,
+ "MediaTypeVideo": 2,
+ "MediaTypeAudio": 3,
+ "MediaTypeCanvas": 4,
+ "MediaTypeFile": 5,
+ "MediaTypePlugin": 6
+ }
+ }
+ Property { name: "x"; type: "int"; isReadonly: true }
+ Property { name: "y"; type: "int"; isReadonly: true }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "linkText"; type: "string"; isReadonly: true }
+ Property { name: "linkUrl"; type: "QUrl"; isReadonly: true }
+ Property { name: "mediaUrl"; type: "QUrl"; isReadonly: true }
+ Property { name: "mediaType"; type: "MediaType"; isReadonly: true }
+ Property { name: "isContentEditable"; type: "bool"; isReadonly: true }
+ Property { name: "misspelledWord"; type: "string"; isReadonly: true }
+ Property { name: "spellCheckerSuggestions"; type: "QStringList"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ }
+ Component {
name: "QQuickWebEngineDownloadItem"
prototype: "QObject"
exports: [
"QtWebEngine/WebEngineDownloadItem 1.1",
"QtWebEngine/WebEngineDownloadItem 1.2",
- "QtWebEngine/WebEngineDownloadItem 1.3"
+ "QtWebEngine/WebEngineDownloadItem 1.3",
+ "QtWebEngine/WebEngineDownloadItem 1.4"
]
isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "DownloadState"
values: {
@@ -83,6 +141,15 @@ Module {
"MimeHtmlSaveFormat": 2
}
}
+ Enum {
+ name: "DownloadType"
+ values: {
+ "Attachment": 0,
+ "DownloadAttribute": 1,
+ "UserRequested": 2,
+ "SavePage": 3
+ }
+ }
Property { name: "id"; type: "uint"; isReadonly: true }
Property { name: "state"; type: "DownloadState"; isReadonly: true }
Property { name: "savePageFormat"; revision: 2; type: "SavePageFormat" }
@@ -90,12 +157,59 @@ Module {
Property { name: "receivedBytes"; type: "qlonglong"; isReadonly: true }
Property { name: "mimeType"; revision: 1; type: "string"; isReadonly: true }
Property { name: "path"; type: "string" }
+ Property { name: "type"; revision: 3; type: "DownloadType"; isReadonly: true }
Signal { name: "savePageFormatChanged"; revision: 2 }
Signal { name: "mimeTypeChanged"; revision: 1 }
+ Signal { name: "typeChanged"; revision: 3 }
Method { name: "accept" }
Method { name: "cancel" }
}
Component {
+ name: "QQuickWebEngineFileDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/FileDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "FileMode"
+ values: {
+ "FileModeOpen": 0,
+ "FileModeOpenMultiple": 1,
+ "FileModeUploadFolder": 2,
+ "FileModeSave": 3
+ }
+ }
+ Property { name: "defaultFileName"; type: "string"; isReadonly: true }
+ Property { name: "acceptedMimeTypes"; type: "QStringList"; isReadonly: true }
+ Property { name: "mode"; type: "FileMode"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "files"; type: "QStringList" }
+ }
+ Method { name: "dialogReject" }
+ }
+ Component {
+ name: "QQuickWebEngineFormValidationMessageRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/FormValidationMessageRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "RequestType"
+ values: {
+ "Show": 0,
+ "Hide": 1,
+ "Move": 2
+ }
+ }
+ Property { name: "anchor"; type: "QRect"; isReadonly: true }
+ Property { name: "text"; type: "string"; isReadonly: true }
+ Property { name: "subText"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "RequestType"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ }
+ Component {
name: "QQuickWebEngineFullScreenRequest"
exports: ["QtWebEngine/FullScreenRequest 1.1"]
isCreatable: false
@@ -139,6 +253,34 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ name: "QQuickWebEngineJavaScriptDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/JavaScriptDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "DialogType"
+ values: {
+ "DialogTypeAlert": 0,
+ "DialogTypeConfirm": 1,
+ "DialogTypePrompt": 2,
+ "DialogTypeBeforeUnload": 3
+ }
+ }
+ Property { name: "message"; type: "string"; isReadonly: true }
+ Property { name: "defaultText"; type: "string"; isReadonly: true }
+ Property { name: "title"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "DialogType"; isReadonly: true }
+ Property { name: "securityOrigin"; type: "QUrl"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "text"; type: "string" }
+ }
+ Method { name: "dialogAccept" }
+ Method { name: "dialogReject" }
+ }
+ Component {
name: "QQuickWebEngineLoadRequest"
prototype: "QObject"
exports: ["QtWebEngine/WebEngineLoadRequest 1.0"]
@@ -188,9 +330,10 @@ Module {
exports: [
"QtWebEngine/WebEngineProfile 1.1",
"QtWebEngine/WebEngineProfile 1.2",
- "QtWebEngine/WebEngineProfile 1.3"
+ "QtWebEngine/WebEngineProfile 1.3",
+ "QtWebEngine/WebEngineProfile 1.4"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "HttpCacheType"
values: {
@@ -216,7 +359,11 @@ Module {
Property { name: "httpAcceptLanguage"; revision: 1; type: "string" }
Property { name: "persistentCookiesPolicy"; type: "PersistentCookiesPolicy" }
Property { name: "httpCacheMaximumSize"; type: "int" }
+ Property { name: "spellCheckLanguages"; revision: 3; type: "QStringList" }
+ Property { name: "spellCheckEnabled"; revision: 3; type: "bool" }
Signal { name: "httpAcceptLanguageChanged"; revision: 1 }
+ Signal { name: "spellCheckLanguagesChanged"; revision: 3 }
+ Signal { name: "spellCheckEnabledChanged"; revision: 3 }
Signal {
name: "downloadRequested"
Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
@@ -310,10 +457,11 @@ Module {
exports: [
"QtWebEngine/WebEngineSettings 1.1",
"QtWebEngine/WebEngineSettings 1.2",
- "QtWebEngine/WebEngineSettings 1.3"
+ "QtWebEngine/WebEngineSettings 1.3",
+ "QtWebEngine/WebEngineSettings 1.4"
]
isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Property { name: "autoLoadImages"; type: "bool" }
Property { name: "javascriptEnabled"; type: "bool" }
Property { name: "javascriptCanOpenWindows"; type: "bool" }
@@ -333,12 +481,18 @@ Module {
Property { name: "accelerated2dCanvasEnabled"; revision: 2; type: "bool" }
Property { name: "autoLoadIconsForPage"; revision: 2; type: "bool" }
Property { name: "touchIconsEnabled"; revision: 2; type: "bool" }
+ Property { name: "focusOnNavigationEnabled"; revision: 3; type: "bool" }
+ Property { name: "printElementBackgrounds"; revision: 3; type: "bool" }
+ Property { name: "allowRunningInsecureContent"; revision: 3; type: "bool" }
Signal { name: "fullScreenSupportEnabledChanged"; revision: 1 }
Signal { name: "screenCaptureEnabledChanged"; revision: 2 }
Signal { name: "webGLEnabledChanged"; revision: 2 }
Signal { name: "accelerated2dCanvasEnabledChanged"; revision: 2 }
Signal { name: "autoLoadIconsForPageChanged"; revision: 2 }
Signal { name: "touchIconsEnabledChanged"; revision: 2 }
+ Signal { name: "focusOnNavigationEnabledChanged"; revision: 3 }
+ Signal { name: "printElementBackgroundsChanged"; revision: 3 }
+ Signal { name: "allowRunningInsecureContentChanged"; revision: 3 }
}
Component {
name: "QQuickWebEngineSingleton"
@@ -364,9 +518,10 @@ Module {
"QtWebEngine/WebEngineView 1.0",
"QtWebEngine/WebEngineView 1.1",
"QtWebEngine/WebEngineView 1.2",
- "QtWebEngine/WebEngineView 1.3"
+ "QtWebEngine/WebEngineView 1.3",
+ "QtWebEngine/WebEngineView 1.4"
]
- exportMetaObjectRevisions: [0, 1, 2, 3]
+ exportMetaObjectRevisions: [0, 1, 2, 3, 4]
Enum {
name: "NavigationRequestAction"
values: {
@@ -459,7 +614,8 @@ Module {
"RequestClose": 28,
"Unselect": 29,
"SavePage": 30,
- "WebActionCount": 31
+ "ViewSource": 31,
+ "WebActionCount": 32
}
}
Enum {
@@ -750,6 +906,44 @@ Module {
revision: 3
Parameter { type: "uint" }
}
+ Signal {
+ name: "contextMenuRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineContextMenuRequest"; isPointer: true }
+ }
+ Signal {
+ name: "authenticationDialogRequested"
+ revision: 4
+ Parameter {
+ name: "request"
+ type: "QQuickWebEngineAuthenticationDialogRequest"
+ isPointer: true
+ }
+ }
+ Signal {
+ name: "javaScriptDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineJavaScriptDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "colorDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineColorDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "fileDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineFileDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "formValidationMessageRequested"
+ revision: 4
+ Parameter {
+ name: "request"
+ type: "QQuickWebEngineFormValidationMessageRequest"
+ isPointer: true
+ }
+ }
Method {
name: "runJavaScript"
Parameter { type: "string" }
@@ -863,5 +1057,10 @@ Module {
revision: 3
Parameter { name: "callback"; type: "QJSValue" }
}
+ Method {
+ name: "replaceMisspelledWord"
+ revision: 4
+ Parameter { name: "replacement"; type: "string" }
+ }
}
}
diff --git a/src/webengine/plugin/testsupport/plugin.cpp b/src/webengine/plugin/testsupport/plugin.cpp
index e1252361e..9352e3666 100644
--- a/src/webengine/plugin/testsupport/plugin.cpp
+++ b/src/webengine/plugin/testsupport/plugin.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
class QtWebEngineTestSupportPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
virtual void registerTypes(const char *uri)
{
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 48217f4a2..f79b0ca22 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -50,6 +50,11 @@
#include <private/qquickwindow_p.h>
#include <private/qsgcontext_p.h>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
+
namespace QtWebEngineCore {
RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderWidgetHostViewQtDelegateClient *client, bool isPopup)
@@ -177,10 +182,33 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuick::createLayer()
return renderContext->sceneGraphContext()->createLayer(renderContext);
}
-QSGImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode()
{
QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return renderContext->sceneGraphContext()->createInternalImageNode();
+#else
return renderContext->sceneGraphContext()->createImageNode();
+#endif
+}
+
+QSGTextureNode *RenderWidgetHostViewQtDelegateQuick::createTextureNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return QQuickItem::window()->createImageNode();
+#else
+ return new QSGSimpleTextureNode();
+#endif
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateQuick::createRectangleNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return QQuickItem::window()->createRectangleNode();
+#else
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
+ return renderContext->sceneGraphContext()->createRectangleNode();
+#endif
}
void RenderWidgetHostViewQtDelegateQuick::update()
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h
index 8d6a5d907..385a98a3c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -66,13 +66,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint&) Q_DECL_OVERRIDE { }
virtual void inputMethodStateChanged(bool editorVisible) Q_DECL_OVERRIDE;
- virtual void setTooltip(const QString&) Q_DECL_OVERRIDE { }
// The QtQuick view doesn't have a backbuffer of its own and doesn't need this
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index 64839c9fa..7b7d32d67 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -111,11 +111,21 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuickWindow::createLayer()
return m_realDelegate->createLayer();
}
-QSGImageNode *RenderWidgetHostViewQtDelegateQuickWindow::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuickWindow::createImageNode()
{
return m_realDelegate->createImageNode();
}
+QSGTextureNode *RenderWidgetHostViewQtDelegateQuickWindow::createTextureNode()
+{
+ return m_realDelegate->createTextureNode();
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateQuickWindow::createRectangleNode()
+{
+ return m_realDelegate->createRectangleNode();
+}
+
void RenderWidgetHostViewQtDelegateQuickWindow::update()
{
QQuickWindow::update();
@@ -138,9 +148,4 @@ void RenderWidgetHostViewQtDelegateQuickWindow::move(const QPoint &screenPos)
QQuickWindow::setPosition(screenPos);
}
-void RenderWidgetHostViewQtDelegateQuickWindow::setTooltip(const QString &tooltip)
-{
- Q_UNUSED(tooltip);
-}
-
} // namespace QtWebEngineCore
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
index 699b4ce9e..d0a5e480c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
@@ -69,13 +69,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint &screenPos) Q_DECL_OVERRIDE;
virtual void inputMethodStateChanged(bool) Q_DECL_OVERRIDE {}
- virtual void setTooltip(const QString &tooltip) Q_DECL_OVERRIDE;
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
private:
diff --git a/src/webengine/ui/AuthenticationDialog.qml b/src/webengine/ui/AuthenticationDialog.qml
index 6a703b7df..a7eedd14d 100644
--- a/src/webengine/ui/AuthenticationDialog.qml
+++ b/src/webengine/ui/AuthenticationDialog.qml
@@ -44,8 +44,8 @@ import QtQuick.Layouts 1.0
import QtQuick.Window 2.2
Window {
- signal accepted(string user, string password);
- signal rejected;
+ signal accepted(string user, string password)
+ signal rejected
property alias text: message.text
title: qsTr("Authentication Required")
@@ -75,7 +75,7 @@ Window {
anchors.margins: 4
property int doubleMargins: anchors.margins * 2
Text {
- id: message;
+ id: message
color: palette.windowText
}
GridLayout {
@@ -88,7 +88,10 @@ Window {
id: userField
focus: true
Layout.fillWidth: true
- onAccepted: acceptDialog()
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
}
Label {
text: qsTr("Password:")
@@ -98,7 +101,10 @@ Window {
id: passwordField
Layout.fillWidth: true
echoMode: TextInput.Password
- onAccepted: acceptDialog()
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
}
}
Item {
diff --git a/src/webengine/ui/ColorDialog.qml b/src/webengine/ui/ColorDialog.qml
index 04af954b9..b74fd2cd7 100644
--- a/src/webengine/ui/ColorDialog.qml
+++ b/src/webengine/ui/ColorDialog.qml
@@ -45,6 +45,6 @@ ColorDialog {
signal selectedColor(var color)
onAccepted: {
- selectedColor(colorDialog.currentColor)
+ selectedColor(colorDialog.currentColor);
}
}
diff --git a/src/webengine/ui/FilePicker.qml b/src/webengine/ui/FilePicker.qml
index 07c8a3638..e6af977ba 100644
--- a/src/webengine/ui/FilePicker.qml
+++ b/src/webengine/ui/FilePicker.qml
@@ -41,7 +41,7 @@ import QtQuick.Dialogs 1.1
FileDialog {
- signal filesSelected(var fileList);
+ signal filesSelected(var fileList)
onAccepted: {
filesSelected(fileUrls);
diff --git a/src/webengine/ui/Menu.qml b/src/webengine/ui/Menu.qml
index 8e07b771c..36efa7680 100644
--- a/src/webengine/ui/Menu.qml
+++ b/src/webengine/ui/Menu.qml
@@ -45,7 +45,7 @@ Controls.Menu {
signal done()
// Use private API for now
- onAboutToHide: doneTimer.start();
+ onAboutToHide: doneTimer.start()
// WORKAROUND On Mac the Menu may be destroyed before the MenuItem
// is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
diff --git a/src/webengine/ui/MessageBubble.qml b/src/webengine/ui/MessageBubble.qml
index c43e46474..056aac1fe 100644
--- a/src/webengine/ui/MessageBubble.qml
+++ b/src/webengine/ui/MessageBubble.qml
@@ -46,8 +46,8 @@ Item {
height: 1
property int maxWidth: 0
- property string mainText: "";
- property string subText: "";
+ property string mainText: ""
+ property string subText: ""
property int border: 1
@@ -111,40 +111,40 @@ Item {
property int messageBoxBottom: height - border
onPaint: {
- var ctx = getContext("2d")
+ var ctx = getContext("2d");
- ctx.lineWidth = bubble.border
- ctx.strokeStyle = "#555"
- ctx.fillStyle = "#ffffe1"
+ ctx.lineWidth = bubble.border;
+ ctx.strokeStyle = "#555";
+ ctx.fillStyle = "#ffffe1";
- ctx.beginPath()
+ ctx.beginPath();
- ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop)
+ ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop);
// Arrow
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop)
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop);
// Message Box
- ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius)
- ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom)
- ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius)
- ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop)
-
- ctx.closePath()
-
- ctx.fill()
- ctx.stroke()
+ ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius);
+ ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom);
+ ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius);
+ ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop);
+
+ ctx.closePath();
+
+ ctx.fill();
+ ctx.stroke();
}
onPainted: {
- bubble.width = bubbleCanvas.width
- bubble.height = bubbleCanvas.height
+ bubble.width = bubbleCanvas.width;
+ bubble.height = bubbleCanvas.height;
}
}
}
diff --git a/src/webengine/ui/PromptDialog.qml b/src/webengine/ui/PromptDialog.qml
index 657bf7631..c4dcd6b98 100644
--- a/src/webengine/ui/PromptDialog.qml
+++ b/src/webengine/ui/PromptDialog.qml
@@ -43,45 +43,49 @@ import QtQuick.Layouts 1.0
import QtQuick 2.5
ApplicationWindow {
- signal input(string text);
- signal accepted;
- signal rejected;
- property alias text: message.text;
- property alias prompt: field.text;
+ signal input(string text)
+ signal accepted
+ signal rejected
+ property alias text: message.text
+ property alias prompt: field.text
width: 350
height: 100
flags: Qt.Dialog
+ onClosing: {
+ rejected();
+ }
+
function open() {
show();
}
ColumnLayout {
- anchors.fill: parent;
- anchors.margins: 4;
+ anchors.fill: parent
+ anchors.margins: 4
Text {
- id: message;
- Layout.fillWidth: true;
+ id: message
+ Layout.fillWidth: true
}
TextField {
- id:field;
- Layout.fillWidth: true;
+ id:field
+ Layout.fillWidth: true
}
RowLayout {
Layout.alignment: Qt.AlignRight
- spacing: 8;
+ spacing: 8
Button {
- text: "OK"
+ text: qsTr("OK")
onClicked: {
- input(field.text)
+ input(field.text);
accepted();
close();
destroy();
}
}
Button {
- text: "Cancel"
+ text: qsTr("Cancel")
onClicked: {
rejected();
close();
diff --git a/src/webengine/ui/ToolTip.qml b/src/webengine/ui/ToolTip.qml
new file mode 100644
index 000000000..96033e8f1
--- /dev/null
+++ b/src/webengine/ui/ToolTip.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+Item {
+ id: toolTipContainer
+ z: 9999
+ width: content.width
+ height: content.height
+ visible: false
+
+ property alias text: toolTip.text
+ property int delayTimerInterval: 1000
+ property int hideTimerInterval: 1500
+
+ Timer {
+ id: delayTimer
+ interval: delayTimerInterval
+ onTriggered: {
+ toolTipContainer.visible = true
+ hideTimer.start()
+ }
+ }
+
+ Timer {
+ id: hideTimer
+ interval: hideTimerInterval
+ onTriggered: toolTipContainer.visible = false
+ }
+
+ Rectangle {
+ id: content
+ color: "#f8eabf"
+ border.color: "black"
+ anchors.centerIn: parent
+ width: toolTip.contentWidth + 10
+ height: toolTip.contentHeight + 10
+ radius: 3
+
+ Text {
+ id: toolTip
+ anchors {fill: parent; margins: 5}
+ wrapMode: Text.WrapAnywhere
+ }
+ }
+
+ function open() {
+ delayTimer.start();
+ }
+
+ function hide() {
+ hideTimer.start();
+ }
+}
diff --git a/src/webengine/ui/qmldir b/src/webengine/ui/qmldir
index 69ebe1bad..e23b972be 100644
--- a/src/webengine/ui/qmldir
+++ b/src/webengine/ui/qmldir
@@ -1,4 +1,4 @@
-module QtWebEngine.UIDelegates
+module QtWebEngine.Controls1Delegates
AlertDialog 1.0 AlertDialog.qml
ConfirmDialog 1.0 ConfirmDialog.qml
FilePicker 1.0 FilePicker.qml
diff --git a/src/webengine/ui/ui.pro b/src/webengine/ui/ui.pro
index 249d7dcfd..bce03cc0c 100644
--- a/src/webengine/ui/ui.pro
+++ b/src/webengine/ui/ui.pro
@@ -1,4 +1,4 @@
-TARGETPATH = QtWebEngine/UIDelegates
+TARGETPATH = QtWebEngine/Controls1Delegates
QML_FILES += \
# Authentication Dialog
@@ -14,6 +14,7 @@ QML_FILES += \
MenuItem.qml \
MenuSeparator.qml \
# Message Bubble
- MessageBubble.qml
+ MessageBubble.qml \
+ ToolTip.qml
load(qml_module)
diff --git a/src/webengine/ui2/AlertDialog.qml b/src/webengine/ui2/AlertDialog.qml
new file mode 100644
index 000000000..4f63c5b70
--- /dev/null
+++ b/src/webengine/ui2/AlertDialog.qml
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted()
+ signal rejected()
+ title: qsTr("Alert Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Image {
+ source: "information.png"
+ }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ Controls.Button {
+ Layout.alignment: Qt.AlignHCenter
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ }
+}
diff --git a/src/webengine/ui2/AuthenticationDialog.qml b/src/webengine/ui2/AuthenticationDialog.qml
new file mode 100644
index 000000000..52fcce3f1
--- /dev/null
+++ b/src/webengine/ui2/AuthenticationDialog.qml
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted(string user, string password)
+ signal rejected()
+ title: qsTr("Authentication Required")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted(userField.text, passwordField.text);
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+
+ property int doubleMargins: anchors.margins * 2
+
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ Text {
+ id: message
+ color: palette.windowText
+ }
+ GridLayout {
+ columns: 2
+ Controls.Label {
+ text: qsTr("Username:")
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id: userField
+ focus: true
+ Layout.fillWidth: true
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
+ }
+ Controls.Label {
+ text: qsTr("Password:")
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id: passwordField
+ Layout.fillWidth: true
+ echoMode: TextInput.Password
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ id: cancelButton
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ Controls.Button {
+ text: qsTr("Log In")
+ onClicked: acceptDialog()
+ }
+ }
+ }
+}
diff --git a/src/webengine/ui2/ConfirmDialog.qml b/src/webengine/ui2/ConfirmDialog.qml
new file mode 100644
index 000000000..0649d3654
--- /dev/null
+++ b/src/webengine/ui2/ConfirmDialog.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted()
+ signal rejected()
+ title: qsTr("Alert Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted();
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Image {
+ source: "question.png"
+ }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ Controls.Button {
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ }
+ }
+}
diff --git a/src/webengine/ui2/Menu.qml b/src/webengine/ui2/Menu.qml
new file mode 100644
index 000000000..0e7b869f5
--- /dev/null
+++ b/src/webengine/ui2/Menu.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+
+Controls.Menu {
+ id: menu
+ signal done()
+
+ // Use private API for now
+ onAboutToHide: doneTimer.start()
+
+ // WORKAROUND On Mac the Menu may be destroyed before the MenuItem
+ // is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
+ Timer {
+ id: doneTimer
+ interval: 100
+ onTriggered: menu.done()
+ }
+}
diff --git a/src/webengine/ui2/MenuItem.qml b/src/webengine/ui2/MenuItem.qml
new file mode 100644
index 000000000..9bf8aac5e
--- /dev/null
+++ b/src/webengine/ui2/MenuItem.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+
+Controls.MenuItem { }
+
diff --git a/src/webengine/ui2/MenuSeparator.qml b/src/webengine/ui2/MenuSeparator.qml
new file mode 100644
index 000000000..0c664084a
--- /dev/null
+++ b/src/webengine/ui2/MenuSeparator.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+Item { id: dummy }
diff --git a/src/webengine/ui2/PromptDialog.qml b/src/webengine/ui2/PromptDialog.qml
new file mode 100644
index 000000000..880213e36
--- /dev/null
+++ b/src/webengine/ui2/PromptDialog.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Layouts 1.0
+import QtQuick.Dialogs 1.2
+
+Dialog {
+ property alias text: message.text
+ property alias prompt: field.text
+ property bool handled: false
+ signal input(string text)
+ signal accepted()
+ signal rejected()
+ title: qsTr("Prompt Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ input(field.text);
+ accepted();
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id:field
+ focus: true
+ Layout.fillWidth: true
+ onAccepted: acceptDialog()
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ Controls.Button {
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ }
+ }
+
+}
diff --git a/src/webengine/ui2/ToolTip.qml b/src/webengine/ui2/ToolTip.qml
new file mode 100644
index 000000000..91645a0f4
--- /dev/null
+++ b/src/webengine/ui2/ToolTip.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+ToolTip {
+ delay: 1000
+ timeout: 1500
+}
diff --git a/src/webengine/ui2/information.png b/src/webengine/ui2/information.png
new file mode 100644
index 000000000..0a2eb87d1
--- /dev/null
+++ b/src/webengine/ui2/information.png
Binary files differ
diff --git a/src/webengine/ui2/qmldir b/src/webengine/ui2/qmldir
new file mode 100644
index 000000000..8ab0d3671
--- /dev/null
+++ b/src/webengine/ui2/qmldir
@@ -0,0 +1,2 @@
+# Internal module
+module QtWebEngine/Controls2Delegates
diff --git a/src/webengine/ui2/question.png b/src/webengine/ui2/question.png
new file mode 100644
index 000000000..2dd92fd79
--- /dev/null
+++ b/src/webengine/ui2/question.png
Binary files differ
diff --git a/src/webengine/ui2/ui2.pro b/src/webengine/ui2/ui2.pro
new file mode 100644
index 000000000..4628d40b5
--- /dev/null
+++ b/src/webengine/ui2/ui2.pro
@@ -0,0 +1,18 @@
+TARGETPATH = QtWebEngine/Controls2Delegates
+
+QML_FILES += \
+ # Authentication Dialog
+ AuthenticationDialog.qml \
+ # JS Dialogs
+ AlertDialog.qml \
+ ConfirmDialog.qml \
+ PromptDialog.qml \
+ # Menus. Based on Qt Quick Controls
+ Menu.qml \
+ MenuItem.qml \
+ MenuSeparator.qml \
+ ToolTip.qml \
+ information.png \
+ question.png
+
+load(qml_module)
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 6ff12b53f..a37484023 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -50,6 +50,10 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <QQmlProperty>
+#include <QCursor>
+#include <QList>
+#include <QScreen>
+#include <QGuiApplication>
// Uncomment for QML debugging
//#define UI_DELEGATES_DEBUG
@@ -77,20 +81,29 @@ static QString fileNameForComponent(UIDelegatesManager::ComponentType type)
return QString();
}
-static QString getUIDelegatesImportDir(QQmlEngine *engine) {
- static QString importDir;
- static bool initialized = false;
- if (initialized)
- return importDir;
- Q_FOREACH (const QString &path, engine->importPathList()) {
- QFileInfo fi(path % QLatin1String("/QtWebEngine/UIDelegates/"));
- if (fi.exists()) {
- importDir = fi.absolutePath();
- break;
- }
- }
- initialized = true;
- return importDir;
+static QPoint calculateToolTipPosition(QPoint &position, QSize &toolTip) {
+ QRect screen;
+ QList<QScreen *> screens = QGuiApplication::screens();
+ Q_FOREACH (const QScreen *src, screens)
+ if (src->availableGeometry().contains(position))
+ screen = src->availableGeometry();
+
+ position += QPoint(2, 16);
+
+ if (position.x() + toolTip.width() > screen.x() + screen.width())
+ position.rx() -= 4 + toolTip.width();
+ if (position.y() + toolTip.height() > screen.y() + screen.height())
+ position.ry() -= 24 + toolTip.height();
+ if (position.y() < screen.y())
+ position.setY(screen.y());
+ if (position.x() + toolTip.width() > screen.x() + screen.width())
+ position.setX(screen.x() + screen.width() - toolTip.width());
+ if (position.x() < screen.x())
+ position.setX(screen.x());
+ if (position.y() + toolTip.height() > screen.y() + screen.height())
+ position.setY(screen.y() + screen.height() - toolTip.height());
+
+ return position;
}
const char *defaultPropertyName(QObject *obj)
@@ -116,20 +129,37 @@ MenuItemHandler::MenuItemHandler(QObject *parent)
UIDelegatesManager::UIDelegatesManager(QQuickWebEngineView *view)
: m_view(view)
, m_messageBubbleItem(0)
+ , m_toolTip(nullptr)
FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_INIT, NO_SEPARATOR)
{
}
+UIDelegatesManager::~UIDelegatesManager()
+{
+}
+
#define COMPONENT_MEMBER_CASE_STATEMENT(TYPE, COMPONENT) \
case TYPE: \
component = &COMPONENT##Component; \
break;
+bool UIDelegatesManager::initializeImportDirs(QStringList &dirs, QQmlEngine *engine) {
+ foreach (const QString &path, engine->importPathList()) {
+ QFileInfo fi(path % QLatin1String("/QtWebEngine/Controls1Delegates/"));
+ if (fi.exists()) {
+ dirs << fi.absolutePath();
+ return true;
+ }
+ }
+ return false;
+}
+
bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
{
QQmlEngine* engine = qmlEngine(m_view);
- if (getUIDelegatesImportDir(engine).isNull())
+ if (m_importDirs.isEmpty() && !initializeImportDirs(m_importDirs, engine))
return false;
+
QQmlComponent **component;
switch (type) {
FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_CASE_STATEMENT, NO_SEPARATOR)
@@ -146,20 +176,25 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
#endif
if (!engine)
return false;
- QFileInfo fi(getUIDelegatesImportDir(engine) % QLatin1Char('/') % fileName);
- if (!fi.exists())
- return false;
- // FIXME: handle async loading
- *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view));
-
- if ((*component)->status() != QQmlComponent::Ready) {
- Q_FOREACH (const QQmlError& err, (*component)->errors())
- qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
- delete *component;
- *component = 0;
- return false;
+
+ foreach (const QString &importDir, m_importDirs) {
+ QFileInfo fi(importDir % QLatin1Char('/') % fileName);
+ if (!fi.exists())
+ continue;
+ // FIXME: handle async loading
+ *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()),
+ QQmlComponent::PreferSynchronous, m_view));
+
+ if ((*component)->status() != QQmlComponent::Ready) {
+ foreach (const QQmlError &err, (*component)->errors())
+ qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
+ delete *component;
+ *component = nullptr;
+ return false;
+ }
+ return true;
}
- return true;
+ return false;
}
#define CHECK_QML_SIGNAL_PROPERTY(prop, location) \
@@ -211,11 +246,11 @@ QObject *UIDelegatesManager::addMenu(QObject *parentMenu, const QString &title,
{
Q_ASSERT(parentMenu);
if (!ensureComponentLoaded(Menu))
- return 0;
+ return nullptr;
QQmlContext *context = qmlContext(m_view);
QObject *menu = menuComponent->beginCreate(context);
// set visual parent for non-Window-based menus
- if (QQuickItem* item = qobject_cast<QQuickItem*>(menu))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(menu))
item->setParentItem(m_view);
if (!title.isEmpty())
@@ -291,7 +326,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d
QQmlContext *context = qmlContext(m_view);
QObject *dialog = dialogComponent->beginCreate(context);
// set visual parent for non-Window-based dialogs
- if (QQuickItem* item = qobject_cast<QQuickItem*>(dialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(dialog))
item->setParentItem(m_view);
dialog->setParent(m_view);
QQmlProperty textProp(dialog, QStringLiteral("text"));
@@ -317,8 +352,6 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d
CHECK_QML_SIGNAL_PROPERTY(inputSignal, dialogComponent->url());
static int setTextIndex = dialogController->metaObject()->indexOfSlot("textProvided(QString)");
QObject::connect(dialog, inputSignal.method(), dialogController.data(), dialogController->metaObject()->method(setTextIndex));
- QQmlProperty closingSignal(dialog, QStringLiteral("onClosing"));
- QObject::connect(dialog, closingSignal.method(), dialogController.data(), dialogController->metaObject()->method(rejectIndex));
}
dialogComponent->completeCreate();
@@ -339,7 +372,7 @@ void UIDelegatesManager::showColorDialog(QSharedPointer<ColorChooserController>
QQmlContext *context = qmlContext(m_view);
QObject *colorDialog = colorDialogComponent->beginCreate(context);
- if (QQuickItem* item = qobject_cast<QQuickItem*>(colorDialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(colorDialog))
item->setParentItem(m_view);
colorDialog->setParent(m_view);
@@ -379,7 +412,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle
QQmlContext *context = qmlContext(m_view);
QObject *authenticationDialog = authenticationDialogComponent->beginCreate(context);
// set visual parent for non-Window-based dialogs
- if (QQuickItem* item = qobject_cast<QQuickItem*>(authenticationDialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(authenticationDialog))
item->setParentItem(m_view);
authenticationDialog->setParent(m_view);
@@ -412,7 +445,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle
QMetaObject::invokeMethod(authenticationDialog, "open");
}
-void UIDelegatesManager::showFilePicker(FilePickerController *controller)
+void UIDelegatesManager::showFilePicker(QSharedPointer<FilePickerController> controller)
{
if (!ensureComponentLoaded(FilePicker))
@@ -420,7 +453,7 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
QQmlContext *context = qmlContext(m_view);
QObject *filePicker = filePickerComponent->beginCreate(context);
- if (QQuickItem* item = qobject_cast<QQuickItem*>(filePicker))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(filePicker))
item->setParentItem(m_view);
filePicker->setParent(m_view);
filePickerComponent->completeCreate();
@@ -442,16 +475,14 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
Q_UNREACHABLE();
}
- controller->setParent(filePicker);
-
QQmlProperty filesPickedSignal(filePicker, QStringLiteral("onFilesSelected"));
CHECK_QML_SIGNAL_PROPERTY(filesPickedSignal, filePickerComponent->url());
QQmlProperty rejectSignal(filePicker, QStringLiteral("onRejected"));
CHECK_QML_SIGNAL_PROPERTY(rejectSignal, filePickerComponent->url());
static int acceptedIndex = controller->metaObject()->indexOfSlot("accepted(QVariant)");
- QObject::connect(filePicker, filesPickedSignal.method(), controller, controller->metaObject()->method(acceptedIndex));
+ QObject::connect(filePicker, filesPickedSignal.method(), controller.data(), controller->metaObject()->method(acceptedIndex));
static int rejectedIndex = controller->metaObject()->indexOfSlot("rejected()");
- QObject::connect(filePicker, rejectSignal.method(), controller, controller->metaObject()->method(rejectedIndex));
+ QObject::connect(filePicker, rejectSignal.method(), controller.data(), controller->metaObject()->method(rejectedIndex));
// delete when done.
static int deleteLaterIndex = filePicker->metaObject()->indexOfSlot("deleteLater()");
@@ -461,6 +492,11 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
QMetaObject::invokeMethod(filePicker, "open");
}
+void UIDelegatesManager::showMenu(QObject *menu)
+{
+ QMetaObject::invokeMethod(menu, "popup");
+}
+
void UIDelegatesManager::showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText)
{
if (!ensureComponentLoaded(MessageBubble))
@@ -487,10 +523,125 @@ void UIDelegatesManager::hideMessageBubble()
void UIDelegatesManager::moveMessageBubble(const QRect &anchor)
{
- Q_ASSERT(!m_messageBubbleItem.isNull());
+ if (m_messageBubbleItem.isNull())
+ return;
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("x")).write(anchor.x());
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("y")).write(anchor.y() + anchor.size().height());
}
+void UIDelegatesManager::showToolTip(const QString &text)
+{
+ if (!ensureComponentLoaded(ToolTip))
+ return;
+
+ if (text.isEmpty()) {
+ m_toolTip.reset();
+ return;
+ }
+
+ if (!m_toolTip.isNull())
+ return;
+
+ QQmlContext *context = qmlContext(m_view);
+ m_toolTip.reset(toolTipComponent->beginCreate(context));
+ if (QQuickItem *item = qobject_cast<QQuickItem *>(m_toolTip.data()))
+ item->setParentItem(m_view);
+ m_toolTip->setParent(m_view);
+ toolTipComponent->completeCreate();
+
+ QQmlProperty(m_toolTip.data(), QStringLiteral("text")).write(text);
+
+ int height = QQmlProperty(m_toolTip.data(), QStringLiteral("height")).read().toInt();
+ int width = QQmlProperty(m_toolTip.data(), QStringLiteral("width")).read().toInt();
+ QSize toolTipSize(width, height);
+ QPoint position = m_view->cursor().pos();
+ position = m_view->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)).toPoint();
+
+ QQmlProperty(m_toolTip.data(), QStringLiteral("x")).write(position.x());
+ QQmlProperty(m_toolTip.data(), QStringLiteral("y")).write(position.y());
+
+ QMetaObject::invokeMethod(m_toolTip.data(), "open");
+}
+
+UI2DelegatesManager::UI2DelegatesManager(QQuickWebEngineView *view) : UIDelegatesManager(view)
+{
+
+}
+
+bool UI2DelegatesManager::initializeImportDirs(QStringList &dirs, QQmlEngine *engine)
+{
+ foreach (const QString &path, engine->importPathList()) {
+ QFileInfo fi1(path % QLatin1String("/QtWebEngine/Controls1Delegates/"));
+ QFileInfo fi2(path % QLatin1String("/QtWebEngine/Controls2Delegates/"));
+ if (fi1.exists() && fi2.exists()) {
+ dirs << fi2.absolutePath() << fi1.absolutePath();
+ return true;
+ }
+ }
+ return false;
+}
+
+QObject *UI2DelegatesManager::addMenu(QObject *parentMenu, const QString &title, const QPoint &pos)
+{
+ Q_ASSERT(parentMenu);
+ if (!ensureComponentLoaded(Menu))
+ return nullptr;
+ QQmlContext *context = qmlContext(m_view);
+ QObject *menu = menuComponent->beginCreate(context);
+
+ // set visual parent for non-Window-based menus
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(menu))
+ item->setParentItem(m_view);
+
+ if (!title.isEmpty())
+ menu->setProperty("title", title);
+ if (!pos.isNull()) {
+ menu->setProperty("x", pos.x());
+ menu->setProperty("y", pos.y());
+ }
+
+ menu->setParent(parentMenu);
+ QQmlProperty doneSignal(menu, QStringLiteral("onDone"));
+ CHECK_QML_SIGNAL_PROPERTY(doneSignal, menuComponent->url())
+ static int deleteLaterIndex = menu->metaObject()->indexOfSlot("deleteLater()");
+ QObject::connect(menu, doneSignal.method(), menu, menu->metaObject()->method(deleteLaterIndex));
+ menuComponent->completeCreate();
+ return menu;
+}
+
+void UI2DelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &/*iconName*/, bool enabled,
+ bool checkable, bool checked)
+{
+ Q_ASSERT(menuItemHandler);
+ if (!ensureComponentLoaded(MenuItem))
+ return;
+
+ QObject *it = menuItemComponent->beginCreate(qmlContext(m_view));
+
+ it->setProperty("text", text);
+ it->setProperty("enabled", enabled);
+ it->setProperty("checked", checked);
+ it->setProperty("checkable", checkable);
+
+ QQmlProperty signal(it, QStringLiteral("onTriggered"));
+ CHECK_QML_SIGNAL_PROPERTY(signal, menuItemComponent->url());
+ QObject::connect(it, signal.method(), menuItemHandler,
+ QMetaMethod::fromSignal(&MenuItemHandler::triggered));
+ menuItemComponent->completeCreate();
+
+ QObject *menu = menuItemHandler->parent();
+ it->setParent(menu);
+
+ QQmlListReference entries(menu, defaultPropertyName(menu), qmlEngine(m_view));
+ if (entries.isValid())
+ entries.append(it);
+}
+
+void UI2DelegatesManager::showMenu(QObject *menu)
+{
+ QMetaObject::invokeMethod(menu, "open");
+}
+
} // namespace QtWebEngineCore
diff --git a/src/webengine/ui_delegates_manager.h b/src/webengine/ui_delegates_manager.h
index b63aa91f1..54ecf0986 100644
--- a/src/webengine/ui_delegates_manager.h
+++ b/src/webengine/ui_delegates_manager.h
@@ -59,7 +59,8 @@
F(PromptDialog, promptDialog) SEPARATOR \
F(FilePicker, filePicker) SEPARATOR \
F(MessageBubble, messageBubble) SEPARATOR \
- F(AuthenticationDialog, authenticationDialog) SEPARATOR
+ F(AuthenticationDialog, authenticationDialog) SEPARATOR \
+ F(ToolTip, toolTip) SEPARATOR \
#define COMMA_SEPARATOR ,
#define SEMICOLON_SEPARATOR ;
@@ -73,6 +74,7 @@ class QQmlContext;
class QQmlComponent;
class QQuickItem;
class QQuickWebEngineView;
+class QQmlEngine;
QT_END_NAMESPACE
namespace QtWebEngineCore {
@@ -102,25 +104,35 @@ public:
};
UIDelegatesManager(QQuickWebEngineView *);
+ virtual ~UIDelegatesManager();
- void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, const QString &iconName = QString(),
- bool enabled = true, bool checkable = false, bool checked = true);
+ virtual bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine);
+ virtual void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &iconName = QString(),
+ bool enabled = true,
+ bool checkable = false, bool checked = true);
void addMenuSeparator(QObject *menu);
- QObject *addMenu(QObject *parentMenu, const QString &title, const QPoint &pos = QPoint());
+ virtual QObject *addMenu(QObject *parentMenu, const QString &title,
+ const QPoint &pos = QPoint());
QQmlContext *creationContextForComponent(QQmlComponent *);
void showColorDialog(QSharedPointer<ColorChooserController>);
void showDialog(QSharedPointer<JavaScriptDialogController>);
void showDialog(QSharedPointer<AuthenticationDialogController>);
- void showFilePicker(FilePickerController *controller);
- void showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText);
+ void showFilePicker(QSharedPointer<FilePickerController>);
+ virtual void showMenu(QObject *menu);
+ void showMessageBubble(const QRect &anchor, const QString &mainText,
+ const QString &subText);
void hideMessageBubble();
void moveMessageBubble(const QRect &anchor);
+ void showToolTip(const QString &text);
-private:
+protected:
bool ensureComponentLoaded(ComponentType);
QQuickWebEngineView *m_view;
QScopedPointer<QQuickItem> m_messageBubbleItem;
+ QScopedPointer<QObject> m_toolTip;
+ QStringList m_importDirs;
FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)
@@ -128,6 +140,24 @@ private:
};
+// delegate manager for qtquickcontrols2 with fallback to qtquickcontrols1
+
+class UI2DelegatesManager : public UIDelegatesManager
+{
+public:
+ UI2DelegatesManager(QQuickWebEngineView *);
+ bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine) override;
+ QObject *addMenu(QObject *parentMenu, const QString &title,
+ const QPoint &pos = QPoint()) override;
+ void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &iconName = QString(),
+ bool enabled = true,
+ bool checkable = false, bool checked = false) override;
+ void showMenu(QObject *menu) override;
+ Q_DISABLE_COPY(UI2DelegatesManager)
+
+};
+
} // namespace QtWebEngineCore
#endif // UI_DELEGATES_MANAGER_H
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 236881958..99b9c4e6f 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -12,7 +12,8 @@ INCLUDEPATH += $$PWD api ../core ../core/api
SOURCES = \
api/qquickwebenginecertificateerror.cpp \
- api/qquickwebenginecontextmenudata.cpp \
+ api/qquickwebenginecontextmenurequest.cpp \
+ api/qquickwebenginedialogrequests.cpp \
api/qquickwebenginedownloaditem.cpp \
api/qquickwebenginehistory.cpp \
api/qquickwebenginefaviconprovider.cpp \
@@ -33,7 +34,8 @@ HEADERS = \
api/qtwebengineglobal.h \
api/qtwebengineglobal_p.h \
api/qquickwebenginecertificateerror_p.h \
- api/qquickwebenginecontextmenudata_p.h \
+ api/qquickwebenginecontextmenurequest_p.h \
+ api/qquickwebenginedialogrequests_p.h \
api/qquickwebenginedownloaditem_p.h \
api/qquickwebenginedownloaditem_p_p.h \
api/qquickwebenginehistory_p.h \
@@ -59,8 +61,26 @@ isQMLTestSupportApiEnabled() {
DEFINES += ENABLE_QML_TESTSUPPORT_API
}
-!contains(WEBENGINE_CONFIG, no_spellcheck) {
+contains(WEBENGINE_CONFIG, use_spellchecker) {
DEFINES += ENABLE_SPELLCHECK
}
+!build_pass {
+ chromium_attributions.commands = \
+ cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \
+ python chromium/tools/licenses.py \
+ --file-template ../../tools/about_credits.tmpl \
+ --entry-template ../../tools/about_credits_entry.tmpl credits \
+ > $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
+ chromium_attributions.CONFIG += phony
+
+ QMAKE_EXTRA_TARGETS += chromium_attributions
+
+ prepare_docs {
+ prepare_docs.depends += chromium_attributions
+ } else {
+ html_docs.depends += chromium_attributions
+ }
+}
+
load(qt_module)
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.cpp b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
index 289bb7ec0..a0641c9dd 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.cpp
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
@@ -104,6 +104,8 @@ QWebEngineCertificateError::~QWebEngineCertificateError()
\value CertificateWeakKey The certificate contains a weak key.
\value CertificateNameConstraintViolation The certificate claimed DNS names that are in violation of name constraints.
\value CertificateValidityTooLong The certificate has a validity period that is too long. (Added in Qt 5.7)
+ \value CertificateTransparencyRequired Certificate Transparency was required for this connection, but the server
+ did not provide CT information that complied with the policy. (Added in Qt 5.8)
*/
/*!
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.h b/src/webenginewidgets/api/qwebenginecertificateerror.h
index 7cb6341bc..82ac281be 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.h
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.h
@@ -70,6 +70,7 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
};
Error error() const;
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
index 4d72071e5..5d68ed0ec 100644
--- a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
+++ b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
@@ -135,7 +135,7 @@ void QWebEngineContextMenuData::reset()
*/
QPoint QWebEngineContextMenuData::position() const
{
- return d ? d->pos : QPoint();
+ return d ? d->position() : QPoint();
}
/*!
@@ -143,7 +143,7 @@ QPoint QWebEngineContextMenuData::position() const
*/
QString QWebEngineContextMenuData::linkText() const
{
- return d ? d->linkText : QString();
+ return d ? d->linkText() : QString();
}
/*!
@@ -151,7 +151,7 @@ QString QWebEngineContextMenuData::linkText() const
*/
QUrl QWebEngineContextMenuData::linkUrl() const
{
- return d ? d->linkUrl : QUrl();
+ return d ? d->linkUrl() : QUrl();
}
/*!
@@ -159,7 +159,7 @@ QUrl QWebEngineContextMenuData::linkUrl() const
*/
QString QWebEngineContextMenuData::selectedText() const
{
- return d ? d->selectedText : QString();
+ return d ? d->selectedText() : QString();
}
/*!
@@ -167,7 +167,7 @@ QString QWebEngineContextMenuData::selectedText() const
*/
QUrl QWebEngineContextMenuData::mediaUrl() const
{
- return d ? d->mediaUrl : QUrl();
+ return d ? d->mediaUrl() : QUrl();
}
/*!
@@ -175,7 +175,7 @@ QUrl QWebEngineContextMenuData::mediaUrl() const
*/
QWebEngineContextMenuData::MediaType QWebEngineContextMenuData::mediaType() const
{
- return d ? static_cast<QWebEngineContextMenuData::MediaType>(d->mediaType) : MediaTypeNone;
+ return d ? static_cast<QWebEngineContextMenuData::MediaType>(d->mediaType()) : MediaTypeNone;
}
/*!
@@ -183,7 +183,34 @@ QWebEngineContextMenuData::MediaType QWebEngineContextMenuData::mediaType() cons
*/
bool QWebEngineContextMenuData::isContentEditable() const
{
- return d ? d->isEditable : false;
+ return d ? d->isEditable() : false;
+}
+
+/*!
+ If the context is a word considered misspelled by the spell-checker, returns the misspelled word.
+
+ For possible replacements of the word, see spellCheckerSuggestions().
+
+ \since 5.8
+*/
+QString QWebEngineContextMenuData::misspelledWord() const
+{
+ if (d)
+ return d->misspelledWord();
+ return QString();
+}
+
+/*!
+ If the context is a word considered misspelled by the spell-checker, returns a list of suggested replacements
+ for misspelledWord().
+
+ \since 5.8
+*/
+QStringList QWebEngineContextMenuData::spellCheckerSuggestions() const
+{
+ if (d)
+ return d->spellCheckerSuggestions();
+ return QStringList();
}
/*!
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.h b/src/webenginewidgets/api/qwebenginecontextmenudata.h
index 8e85fee16..97cfe9f65 100644
--- a/src/webenginewidgets/api/qwebenginecontextmenudata.h
+++ b/src/webenginewidgets/api/qwebenginecontextmenudata.h
@@ -76,6 +76,8 @@ public:
QUrl mediaUrl() const;
MediaType mediaType() const;
bool isContentEditable() const;
+ QString misspelledWord() const;
+ QStringList spellCheckerSuggestions() const;
private:
void reset();
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index bfb0dd0e8..b777a0898 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -80,6 +80,7 @@ QWebEngineDownloadItemPrivate::QWebEngineDownloadItemPrivate(QWebEngineProfilePr
, downloadId(-1)
, downloadState(QWebEngineDownloadItem::DownloadCancelled)
, savePageFormat(QWebEngineDownloadItem::MimeHtmlSaveFormat)
+ , type(QWebEngineDownloadItem::Attachment)
, downloadUrl(url)
, totalBytes(-1)
, receivedBytes(0)
@@ -218,6 +219,25 @@ quint32 QWebEngineDownloadItem::id() const
*/
/*!
+ \enum QWebEngineDownloadItem::DownloadType
+ \since 5.8
+
+ Describes the requested download's type.
+
+ \value Attachment The web server's response includes a
+ \c Content-Disposition header with the \c attachment directive. If \c Content-Disposition
+ is present in the reply, the web server is indicating that the client should prompt the
+ user to save the content regardless of the content type.
+ See \l {RFC 2616 section 19.5.1} for details.
+ \value DownloadAttribute The user clicked a link with the \c download
+ attribute. See \l {HTML download attribute} for details.
+ \value UserRequested The user initiated the download, for example by
+ selecting a web action.
+ \value SavePage Saving of the current page was requested (for example by
+ the \l{QWebEnginePage::WebAction}{QWebEnginePage::SavePage} web action).
+*/
+
+/*!
Returns the download item's current state.
\sa QWebEngineDownloadItem::DownloadState
@@ -342,6 +362,18 @@ void QWebEngineDownloadItem::setSavePageFormat(QWebEngineDownloadItem::SavePageF
d->savePageFormat = format;
}
+/*!
+ Returns the requested download's type.
+ \since 5.8
+
+ */
+
+QWebEngineDownloadItem::DownloadType QWebEngineDownloadItem::type() const
+{
+ Q_D(const QWebEngineDownloadItem);
+ return d->type;
+}
+
QWebEngineDownloadItem::QWebEngineDownloadItem(QWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h
index 80b5c06c5..4b58748ad 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.h
@@ -72,6 +72,14 @@ public:
};
Q_ENUM(SavePageFormat)
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+ Q_ENUM(DownloadType)
+
quint32 id() const;
DownloadState state() const;
qint64 totalBytes() const;
@@ -83,6 +91,7 @@ public:
bool isFinished() const;
SavePageFormat savePageFormat() const;
void setSavePageFormat(SavePageFormat format);
+ DownloadType type() const;
public Q_SLOTS:
void accept();
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem_p.h b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
index ddb3b443a..9ddb45444 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem_p.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
@@ -72,6 +72,7 @@ public:
quint32 downloadId;
QWebEngineDownloadItem::DownloadState downloadState;
QWebEngineDownloadItem::SavePageFormat savePageFormat;
+ QWebEngineDownloadItem::DownloadType type;
QString downloadPath;
const QUrl downloadUrl;
QString mimeType;
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index e84c91bd7..0188cfef8 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -90,6 +90,8 @@ QT_BEGIN_NAMESPACE
using namespace QtWebEngineCore;
+static const int MaxTooltipLength = 1024;
+
static QWebEnginePage::WebWindowType toWindowType(WebContentsAdapterClient::WindowOpenDisposition disposition)
{
switch (disposition) {
@@ -390,6 +392,13 @@ void QWebEnginePagePrivate::didPrintPage(quint64 requestId, const QByteArray &re
m_callbacks.invoke(requestId, result);
}
+#ifndef QT_NO_PRINTER
+void QWebEnginePagePrivate::didPrintPageOnPrinter(quint64 requestId, bool result)
+{
+ m_callbacks.invoke(requestId, result);
+}
+#endif
+
void QWebEnginePagePrivate::passOnFocus(bool reverse)
{
if (view)
@@ -489,6 +498,9 @@ void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const
case QWebEnginePage::ReloadAndBypassCache:
enabled = !isLoading;
break;
+ case QWebEnginePage::ViewSource:
+ enabled = adapter->canViewSource();
+ break;
default:
break;
}
@@ -504,6 +516,7 @@ void QWebEnginePagePrivate::updateNavigationActions()
updateAction(QWebEnginePage::Stop);
updateAction(QWebEnginePage::Reload);
updateAction(QWebEnginePage::ReloadAndBypassCache);
+ updateAction(QWebEnginePage::ViewSource);
}
#ifndef QT_NO_ACTION
@@ -788,6 +801,29 @@ void QWebEnginePage::setBackgroundColor(const QColor &color)
}
/*!
+ * Save the currently loaded web page to disk.
+ *
+ * The web page is saved to \a filePath in the specified \a{format}.
+ *
+ * This is a short cut for the following actions:
+ * \list
+ * \li Trigger the Save web action.
+ * \li Accept the next download item and set the specified file path and save format.
+ * \endlist
+ *
+ * This function issues an asynchronous download request for the web page and returns immediately.
+ *
+ * \sa QWebEngineDownloadItem::SavePageFormat
+ * \since 5.8
+ */
+void QWebEnginePage::save(const QString &filePath,
+ QWebEngineDownloadItem::SavePageFormat format) const
+{
+ Q_D(const QWebEnginePage);
+ d->adapter->save(filePath, format);
+}
+
+/*!
\property QWebEnginePage::audioMuted
\brief whether the current page audio is muted.
\since 5.7
@@ -972,6 +1008,9 @@ QAction *QWebEnginePage::action(WebAction action) const
case SavePage:
text = tr("Save &Page");
break;
+ case ViewSource:
+ text = tr("&View Page Source");
+ break;
case NoWebAction:
case WebActionCount:
Q_UNREACHABLE();
@@ -1036,122 +1075,122 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
d->adapter->unselect();
break;
case OpenLinkInThisWindow:
- if (menuData.linkUrl.isValid())
- setUrl(menuData.linkUrl);
+ if (menuData.linkUrl().isValid())
+ setUrl(menuData.linkUrl());
break;
case OpenLinkInNewWindow:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserWindow);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case OpenLinkInNewTab:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserTab);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case OpenLinkInNewBackgroundTab:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserBackgroundTab);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case CopyLinkToClipboard:
- if (menuData.linkUrl.isValid()) {
- QString urlString = menuData.linkUrl.toString(QUrl::FullyEncoded);
- QString title = menuData.linkText.toHtmlEscaped();
+ if (menuData.linkUrl().isValid()) {
+ QString urlString = menuData.linkUrl().toString(QUrl::FullyEncoded);
+ QString title = menuData.linkText().toHtmlEscaped();
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<a href=\"") + urlString + QStringLiteral("\">") + title + QStringLiteral("</a>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << menuData.linkUrl);
+ data->setUrls(QList<QUrl>() << menuData.linkUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadLinkToDisk:
- if (menuData.linkUrl.isValid())
- d->adapter->download(menuData.linkUrl, menuData.suggestedFileName);
+ if (menuData.linkUrl().isValid())
+ d->adapter->download(menuData.linkUrl(), menuData.suggestedFileName());
break;
case CopyImageToClipboard:
- if (menuData.hasImageContent &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeImage ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeCanvas))
+ if (menuData.hasImageContent() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeImage ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas))
{
- d->adapter->copyImageAt(menuData.pos);
+ d->adapter->copyImageAt(menuData.position());
}
break;
case CopyImageUrlToClipboard:
- if (menuData.mediaUrl.isValid() && menuData.mediaType == WebEngineContextMenuData::MediaTypeImage) {
- QString urlString = menuData.mediaUrl.toString(QUrl::FullyEncoded);
- QString title = menuData.linkText;
+ if (menuData.mediaUrl().isValid() && menuData.mediaType() == WebEngineContextMenuData::MediaTypeImage) {
+ QString urlString = menuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString title = menuData.linkText();
if (!title.isEmpty())
title = QStringLiteral(" alt=\"%1\"").arg(title.toHtmlEscaped());
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<img src=\"") + urlString + QStringLiteral("\"") + title + QStringLiteral("></img>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << menuData.mediaUrl);
+ data->setUrls(QList<QUrl>() << menuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadImageToDisk:
case DownloadMediaToDisk:
- if (menuData.mediaUrl.isValid())
- d->adapter->download(menuData.mediaUrl, menuData.suggestedFileName);
+ if (menuData.mediaUrl().isValid())
+ d->adapter->download(menuData.mediaUrl(), menuData.suggestedFileName());
break;
case CopyMediaUrlToClipboard:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- QString urlString = menuData.mediaUrl.toString(QUrl::FullyEncoded);
+ QString urlString = menuData.mediaUrl().toString(QUrl::FullyEncoded);
QMimeData *data = new QMimeData();
data->setText(urlString);
- if (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio)
+ if (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio)
data->setHtml(QStringLiteral("<audio src=\"") + urlString + QStringLiteral("\"></audio>"));
else
data->setHtml(QStringLiteral("<video src=\"") + urlString + QStringLiteral("\"></video>"));
- data->setUrls(QList<QUrl>() << menuData.mediaUrl);
+ data->setUrls(QList<QUrl>() << menuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case ToggleMediaControls:
- if (menuData.mediaUrl.isValid() && menuData.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaControls);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerControls, enable);
+ if (menuData.mediaUrl().isValid() && menuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaControls);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
}
break;
case ToggleMediaLoop:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaLoop);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerLoop, enable);
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaLoop);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
}
break;
case ToggleMediaPlayPause:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = (menuData.mediaFlags & WebEngineContextMenuData::MediaPaused);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerPlay, enable);
+ bool enable = (menuData.mediaFlags() & WebEngineContextMenuData::MediaPaused);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
}
break;
case ToggleMediaMute:
- if (menuData.mediaUrl.isValid() && menuData.mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
+ if (menuData.mediaUrl().isValid() && menuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
// Make sure to negate the value, so that toggling actually works.
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaMuted);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerMute, enable);
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaMuted);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
}
break;
case InspectElement:
- d->adapter->inspectElementAt(menuData.pos);
+ d->adapter->inspectElementAt(menuData.position());
break;
case ExitFullScreen:
d->adapter->exitFullScreen();
@@ -1162,6 +1201,17 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
case SavePage:
d->adapter->save();
break;
+ case ViewSource:
+ // This is a workaround to make the ViewSource action working in a context menu.
+ // The WebContentsAdapter::viewSource() method deletes a
+ // RenderWidgetHostViewQtDelegateWidget instance which passes the control to the event
+ // loop. If the QMenu::aboutToHide() signal is connected to the QObject::deleteLater()
+ // slot the QMenu is deleted by the event handler while the ViewSource action is still not
+ // completed. This may lead to a crash. To avoid this the WebContentsAdapter::viewSource()
+ // method is called indirectly via the QTimer::singleShot() function which schedules the
+ // the viewSource() call after the QMenu's destruction.
+ QTimer::singleShot(0, this, [d](){ d->adapter->viewSource(); });
+ break;
case NoWebAction:
break;
case WebActionCount:
@@ -1170,6 +1220,22 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
}
}
+/*!
+ * \since 5.8
+ * Replace the current misspelled word with \a replacement.
+ *
+ * The current misspelled word can be found in QWebEngineContextMenuData::misspelledWord(),
+ * and suggested replacements in QWebEngineContextMenuData::spellCheckerSuggestions().
+ *
+ * \sa contextMenuData(),
+ */
+
+void QWebEnginePage::replaceMisspelledWord(const QString &replacement)
+{
+ Q_D(QWebEnginePage);
+ d->adapter->replaceMisspelling(replacement);
+}
+
void QWebEnginePage::findText(const QString &subString, FindFlags options, const QWebEngineCallback<bool> &resultCallback)
{
Q_D(QWebEnginePage);
@@ -1206,7 +1272,7 @@ bool QWebEnginePagePrivate::contextMenuRequested(const WebEngineContextMenuData
return false;
contextData.reset();
- QContextMenuEvent event(QContextMenuEvent::Mouse, data.pos, view->mapToGlobal(data.pos));
+ QContextMenuEvent event(QContextMenuEvent::Mouse, data.position(), view->mapToGlobal(data.position()));
switch (view->contextMenuPolicy()) {
case Qt::PreventContextMenu:
return false;
@@ -1216,7 +1282,7 @@ bool QWebEnginePagePrivate::contextMenuRequested(const WebEngineContextMenuData
break;
case Qt::CustomContextMenu:
contextData = data;
- Q_EMIT view->customContextMenuRequested(data.pos);
+ Q_EMIT view->customContextMenuRequested(data.position());
break;
case Qt::ActionsContextMenu:
if (view->actions().count()) {
@@ -1351,6 +1417,16 @@ bool QWebEnginePagePrivate::isEnabled() const
return true;
}
+void QWebEnginePagePrivate::setToolTip(const QString &toolTipText)
+{
+ if (view) {
+ QString wrappedTip;
+ if (!toolTipText.isEmpty())
+ wrappedTip = QLatin1String("<p>") % toolTipText.toHtmlEscaped().left(MaxTooltipLength) % QLatin1String("</p>");
+ view->setToolTip(wrappedTip);
+ }
+}
+
QMenu *QWebEnginePage::createStandardContextMenu()
{
Q_D(QWebEnginePage);
@@ -1361,13 +1437,25 @@ QMenu *QWebEnginePage::createStandardContextMenu()
QAction *action = 0;
const WebEngineContextMenuData &contextMenuData = *d->contextData.d;
- if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) {
+ if (contextMenuData.isEditable() && !contextMenuData.spellCheckerSuggestions().isEmpty()) {
+ QPointer<QWebEnginePage> thisRef(this);
+ for (int i=0; i < contextMenuData.spellCheckerSuggestions().count() && i < 4; i++) {
+ QAction *action = new QAction(menu);
+ QString replacement = contextMenuData.spellCheckerSuggestions().at(i);
+ QObject::connect(action, &QAction::triggered, [thisRef, replacement] { if (thisRef) thisRef->replaceMisspelledWord(replacement); });
+ action->setText(replacement);
+ menu->addAction(action);
+ }
+ menu->addSeparator();
+ }
+
+ if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
action = QWebEnginePage::action(OpenLinkInThisWindow);
action->setText(tr("Follow Link"));
menu->addAction(action);
menu->addAction(QWebEnginePage::action(DownloadLinkToDisk));
}
- if (contextMenuData.selectedText.isEmpty()) {
+ if (contextMenuData.selectedText().isEmpty()) {
action = new QAction(QIcon::fromTheme(QStringLiteral("go-previous")), tr("&Back"), menu);
connect(action, &QAction::triggered, d->view, &QWebEngineView::back);
action->setEnabled(d->adapter->canGoBack());
@@ -1381,16 +1469,18 @@ QMenu *QWebEnginePage::createStandardContextMenu()
action = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), tr("&Reload"), menu);
connect(action, &QAction::triggered, d->view, &QWebEngineView::reload);
menu->addAction(action);
+
+ menu->addAction(QWebEnginePage::action(ViewSource));
} else {
menu->addAction(QWebEnginePage::action(Copy));
menu->addAction(QWebEnginePage::action(Unselect));
}
- if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) {
+ if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
menu->addAction(QWebEnginePage::action(CopyLinkToClipboard));
}
- if (contextMenuData.mediaUrl.isValid()) {
- switch (contextMenuData.mediaType) {
+ if (contextMenuData.mediaUrl().isValid()) {
+ switch (contextMenuData.mediaType()) {
case WebEngineContextMenuData::MediaTypeImage:
menu->addAction(QWebEnginePage::action(DownloadImageToDisk));
menu->addAction(QWebEnginePage::action(CopyImageUrlToClipboard));
@@ -1405,15 +1495,15 @@ QMenu *QWebEnginePage::createStandardContextMenu()
menu->addAction(QWebEnginePage::action(CopyMediaUrlToClipboard));
menu->addAction(QWebEnginePage::action(ToggleMediaPlayPause));
menu->addAction(QWebEnginePage::action(ToggleMediaLoop));
- if (contextMenuData.mediaFlags & WebEngineContextMenuData::MediaHasAudio)
+ if (contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio)
menu->addAction(QWebEnginePage::action(ToggleMediaMute));
- if (contextMenuData.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls)
+ if (contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls)
menu->addAction(QWebEnginePage::action(ToggleMediaControls));
break;
default:
break;
}
- } else if (contextMenuData.mediaType == WebEngineContextMenuData::MediaTypeCanvas) {
+ } else if (contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas) {
menu->addAction(QWebEnginePage::action(CopyImageToClipboard));
}
@@ -1471,7 +1561,7 @@ static inline QWebEnginePage::FileSelectionMode toPublic(FilePickerController::F
return static_cast<QWebEnginePage::FileSelectionMode>(mode);
}
-void QWebEnginePagePrivate::runFileChooser(FilePickerController *controller)
+void QWebEnginePagePrivate::runFileChooser(QSharedPointer<FilePickerController> controller)
{
Q_Q(QWebEnginePage);
@@ -1481,8 +1571,6 @@ void QWebEnginePagePrivate::runFileChooser(FilePickerController *controller)
controller->accepted(selectedFileNames);
else
controller->rejected();
-
- delete controller;
}
WebEngineSettings *QWebEnginePagePrivate::webEngineSettings() const
@@ -1779,6 +1867,28 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
d->m_callbacks.registerCallback(requestId, resultCallback);
}
+#ifndef QT_NO_PRINTER
+/*!
+ \fn void QWebEnginePage::print(QPrinter *printer, FunctorOrLambda resultCallback)
+ Renders the current content of the page into a temporary PDF document, then prints it using \a printer.
+
+ The settings for creating and printing the PDF document will be retrieved from the \a printer
+ object.
+ It is the users responsibility to ensure the \a printer remains valid until \a resultCallback
+ has been called.
+
+ The \a resultCallback must take a boolean as parameter. If printing was successful, this
+ boolean will have the value \c true, otherwise, its value will be \c false.
+ \since 5.8
+*/
+void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback)
+{
+ Q_D(QWebEnginePage);
+ quint64 requestId = d->adapter->printOnPrinterCallbackResult(printer);
+ d->m_callbacks.registerCallback(requestId, resultCallback);
+}
+#endif // QT_NO_PRINTER
+
/*!
\since 5.7
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
index 2ac8e0f3e..e85f9b30e 100644
--- a/src/webenginewidgets/api/qwebenginepage.h
+++ b/src/webenginewidgets/api/qwebenginepage.h
@@ -42,6 +42,7 @@
#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
#include <QtWebEngineWidgets/qwebenginecertificateerror.h>
+#include <QtWebEngineWidgets/qwebenginedownloaditem.h>
#include <QtWebEngineCore/qwebenginecallback.h>
#include <QtCore/qobject.h>
@@ -53,6 +54,9 @@
QT_BEGIN_NAMESPACE
class QMenu;
+#ifndef QT_NO_PRINTER
+class QPrinter;
+#endif
class QWebChannel;
class QWebEngineContextMenuData;
class QWebEngineFullScreenRequest;
@@ -123,6 +127,7 @@ public:
Unselect,
SavePage,
OpenLinkInNewBackgroundTab,
+ ViewSource,
WebActionCount
};
@@ -206,6 +211,8 @@ public:
#endif
virtual void triggerAction(WebAction action, bool checked = false);
+ void replaceMisspelledWord(const QString &replacement);
+
virtual bool event(QEvent*);
#ifdef Q_QDOC
void findText(const QString &subString, FindFlags options = FindFlags());
@@ -261,6 +268,9 @@ public:
QColor backgroundColor() const;
void setBackgroundColor(const QColor &color);
+ void save(const QString &filePath, QWebEngineDownloadItem::SavePageFormat format
+ = QWebEngineDownloadItem::MimeHtmlSaveFormat) const;
+
bool isAudioMuted() const;
void setAudioMuted(bool muted);
bool recentlyAudible() const;
@@ -272,6 +282,14 @@ public:
void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF()));
#endif
+#ifndef QT_NO_PRINTER
+#ifdef Q_QDOC
+ void print(QPrinter *printer, FunctorOrLambda resultCallback);
+#else
+ void print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback);
+#endif // QDOC
+#endif // QT_NO_PRINTER
+
const QWebEngineContextMenuData &contextMenuData() const;
Q_SIGNALS:
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index 96640a63a..8d78429d8 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -112,13 +112,16 @@ public:
virtual void requestFullScreenMode(const QUrl &origin, bool fullscreen) Q_DECL_OVERRIDE;
virtual bool isFullScreenMode() const Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
- virtual void runFileChooser(QtWebEngineCore::FilePickerController *controller) Q_DECL_OVERRIDE;
+ virtual void runFileChooser(QSharedPointer<QtWebEngineCore::FilePickerController>) Q_DECL_OVERRIDE;
virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void didFindText(quint64 requestId, int matchCount) Q_DECL_OVERRIDE;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) Q_DECL_OVERRIDE;
+#ifndef QT_NO_PRINTER
+ virtual void didPrintPageOnPrinter(quint64 requestId, bool result) Q_DECL_OVERRIDE;
+#endif
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE;
virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
virtual void authenticationRequired(QSharedPointer<QtWebEngineCore::AuthenticationDialogController>) Q_DECL_OVERRIDE;
@@ -141,6 +144,7 @@ public:
void startDragging(const content::DropData &dropData, Qt::DropActions allowedActions,
const QPixmap &pixmap, const QPoint &offset) Q_DECL_OVERRIDE;
virtual bool isEnabled() const Q_DECL_OVERRIDE;
+ virtual void setToolTip(const QString &toolTipText) Q_DECL_OVERRIDE;
const QObject *holdingQObject() const Q_DECL_OVERRIDE;
virtual QSharedPointer<QtWebEngineCore::BrowserContextAdapter> browserContextAdapter() Q_DECL_OVERRIDE;
@@ -173,6 +177,7 @@ public:
QWebChannel *webChannel;
unsigned int webChannelWorldId;
QUrl iconUrl;
+ bool m_navigationActionTriggered;
mutable QtWebEngineCore::CallbackDirectory m_callbacks;
mutable QAction *actions[QWebEnginePage::WebActionCount];
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 664323034..886a7207e 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -96,6 +96,11 @@ using QtWebEngineCore::BrowserContextAdapter;
A QWebEngineUrlSchemeHandler can be registered for a profile by installUrlSchemeHandler()
to add support for custom URL schemes. Requests for the scheme are then issued to
QWebEngineUrlSchemeHandler::requestStarted() as QWebEngineUrlRequestJob objects.
+
+ Spellchecking HTML form fields can be enabled per profile by using the setSpellCheckEnabled()
+ method and the current languages used for spellchecking can be set by using the
+ setSpellCheckLanguages() method.
+
*/
/*!
@@ -180,10 +185,12 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
Q_ASSERT(!m_ongoingDownloads.contains(info.id));
QWebEngineDownloadItemPrivate *itemPrivate = new QWebEngineDownloadItemPrivate(this, info.url);
itemPrivate->downloadId = info.id;
- itemPrivate->downloadState = QWebEngineDownloadItem::DownloadRequested;
+ itemPrivate->downloadState = info.accepted ? QWebEngineDownloadItem::DownloadInProgress
+ : QWebEngineDownloadItem::DownloadRequested;
itemPrivate->downloadPath = info.path;
itemPrivate->mimeType = info.mimeType;
itemPrivate->savePageFormat = static_cast<QWebEngineDownloadItem::SavePageFormat>(info.savePageFormat);
+ itemPrivate->type = static_cast<QWebEngineDownloadItem::DownloadType>(info.downloadType);
QWebEngineDownloadItem *download = new QWebEngineDownloadItem(itemPrivate, q);
@@ -556,6 +563,87 @@ QWebEngineProfile *QWebEngineProfile::defaultProfile()
}
/*!
+ \since 5.8
+
+ Sets the current list of \a languages for the spell checker.
+ Each language should match the name of the \c .bdic dictionary.
+ For example, the language \c en-US will load the \c en-US.bdic
+ dictionary file.
+
+ Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
+ first in the local directory and if it is not found, in the Qt
+ installation directory.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
+ how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
+ platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
+ will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
+ subdirectory located inside the application bundle \c Resources directory, and also in the
+ \c Resources directory located inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
+
+ \list
+ \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
+ \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
+ \endlist
+
+ For more information about how to compile \c .bdic dictionaries, see the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+*/
+void QWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
+{
+ Q_D(QWebEngineProfile);
+ d->browserContext()->setSpellCheckLanguages(languages);
+}
+
+/*!
+ \since 5.8
+
+ Returns the list of languages used by the spell checker.
+*/
+QStringList QWebEngineProfile::spellCheckLanguages() const
+{
+ const Q_D(QWebEngineProfile);
+ return d->browserContext()->spellCheckLanguages();
+}
+
+/*!
+ \since 5.8
+
+ Enables spell checker if \a enable is \c true, otherwise disables it.
+ \sa isSpellCheckEnabled()
+ */
+void QWebEngineProfile::setSpellCheckEnabled(bool enable)
+{
+ Q_D(QWebEngineProfile);
+ d->browserContext()->setSpellCheckEnabled(enable);
+}
+/*!
+ \since 5.8
+
+ Returns \c true if the spell checker is enabled; otherwise returns \c false.
+ \sa setSpellCheckEnabled()
+ */
+bool QWebEngineProfile::isSpellCheckEnabled() const
+{
+ const Q_D(QWebEngineProfile);
+ return d->browserContext()->isSpellCheckEnabled();
+}
+
+/*!
Returns the default settings for all pages in this profile.
*/
QWebEngineSettings *QWebEngineProfile::settings() const
diff --git a/src/webenginewidgets/api/qwebengineprofile.h b/src/webenginewidgets/api/qwebengineprofile.h
index d981fa5bb..1ce4bfe17 100644
--- a/src/webenginewidgets/api/qwebengineprofile.h
+++ b/src/webenginewidgets/api/qwebengineprofile.h
@@ -121,6 +121,11 @@ public:
void clearHttpCache();
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
+ void setSpellCheckEnabled(bool enabled);
+ bool isSpellCheckEnabled() const;
+
static QWebEngineProfile *defaultProfile();
Q_SIGNALS:
diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp
index 73dd5075e..04a9d979a 100644
--- a/src/webenginewidgets/api/qwebenginescript.cpp
+++ b/src/webenginewidgets/api/qwebenginescript.cpp
@@ -61,7 +61,8 @@ using QtWebEngineCore::UserScript;
not accessible from a different one. ScriptWorldId provides some predefined IDs for this
purpose.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
Use QWebEnginePage::scripts() and QWebEngineProfile::scripts() to access
the collection of scripts associated with a single page or a
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
index 4b77b4699..8d393924f 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection.cpp
+++ b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
@@ -40,7 +40,7 @@
#include "qwebenginescriptcollection.h"
#include "qwebenginescriptcollection_p.h"
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
using QtWebEngineCore::UserScript;
diff --git a/src/webenginewidgets/api/qwebenginesettings.cpp b/src/webenginewidgets/api/qwebenginesettings.cpp
index dfca16287..50002e3e6 100644
--- a/src/webenginewidgets/api/qwebenginesettings.cpp
+++ b/src/webenginewidgets/api/qwebenginesettings.cpp
@@ -89,6 +89,13 @@ static WebEngineSettings::Attribute toWebEngineAttribute(QWebEngineSettings::Web
return WebEngineSettings::AutoLoadIconsForPage;
case QWebEngineSettings::TouchIconsEnabled:
return WebEngineSettings::TouchIconsEnabled;
+ case QWebEngineSettings::FocusOnNavigationEnabled:
+ return WebEngineSettings::FocusOnNavigationEnabled;
+ case QWebEngineSettings::PrintElementBackgrounds:
+ return WebEngineSettings::PrintElementBackgrounds;
+ case QWebEngineSettings::AllowRunningInsecureContent:
+ return WebEngineSettings::AllowRunningInsecureContent;
+
default:
return WebEngineSettings::UnsupportedInCoreSettings;
}
diff --git a/src/webenginewidgets/api/qwebenginesettings.h b/src/webenginewidgets/api/qwebenginesettings.h
index 8eda50ee2..e3fb83ff5 100644
--- a/src/webenginewidgets/api/qwebenginesettings.h
+++ b/src/webenginewidgets/api/qwebenginesettings.h
@@ -85,7 +85,10 @@ public:
WebGLEnabled,
Accelerated2dCanvasEnabled,
AutoLoadIconsForPage,
- TouchIconsEnabled
+ TouchIconsEnabled,
+ FocusOnNavigationEnabled,
+ PrintElementBackgrounds,
+ AllowRunningInsecureContent
};
enum FontSize {
diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc b/src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc
index dcdd82e04..dcdd82e04 100644
--- a/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc
+++ b/src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
index 59d7bc5d1..abfd17ce3 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebenginewidgets-index.html
\title Qt WebEngine Widgets
- \ingroup modules
\brief Provides a web browser engine as well as C++ classes to render web content and interact
with it.
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
index d0f2fd930..959f96b10 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
@@ -40,9 +40,9 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet qtwebengine_build_snippet.qdoc 1
+ \snippet qtwebenginewidgets_build_snippet.qdoc 1
To link against the module, add the following to your qmake project file:
- \snippet qtwebengine_build_snippet.qdoc 0
+ \snippet qtwebenginewidgets_build_snippet.qdoc 0
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index 539e809d4..58abc9fa1 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -87,6 +87,10 @@
QWebEngineScript::ScriptWorldId provides some predefined IDs for this purpose. Using the
\c runJavaScript() version without the world ID is the same as running the script in the
\c MainWorld.
+
+ The \l {QWebEngineSettings::FocusOnNavigationEnabled} {FocusOnNavigationEnabled} setting can be
+ used to stop the view associated with the page from automatically receiving focus when a
+ navigation operation occurs (like loading or reloading a page or navigating through history).
*/
/*!
@@ -152,6 +156,7 @@
\value Unselect Clear the current selection. (Added in Qt 5.7)
\value SavePage Save the current page to disk. MHTML is the default format that is used to store
the web page on disk. (Added in Qt 5.7)
+ \value ViewSource Show the source of the current page in a new tab. (Added in Qt 5.8)
\omitvalue WebActionCount
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
index 07c4965d0..07afd6501 100644
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
@@ -147,6 +147,19 @@
\value TouchIconsEnabled
Enables support for touch icons and precomposed touch icons
Disabled by default. (Added in Qt 5.7)
+ \value FocusOnNavigationEnabled
+ Gives focus to the view associated with the page, whenever a navigation operation occurs
+ (load, stop, reload, reload and bypass cache, forward, backward, set content, and so
+ on).
+ Enabled by default. (Added in Qt 5.8)
+ \value PrintElementBackgrounds
+ Turns on printing of CSS backgrounds when printing a web page.
+ Enabled by default. (Added in Qt 5.8)
+ \value AllowRunningInsecureContent
+ By default, HTTPS pages cannot run JavaScript, CSS, plugins or
+ web-sockets from HTTP URLs. This provides an override to get
+ the old insecure behavior.
+ Disabled by default. (Added in Qt 5.8)
*/
/*!
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 5a4c1b52b..5b96459af 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -65,16 +65,13 @@
The zoomFactor() property enables zooming the contents of the web page by a
scale factor.
- If you require a custom context menu, you can implement it by reimplementing
- \l{QWidget::}{contextMenuEvent()} and populating your QMenu with the actions
- obtained from pageAction(). Additional functionality, such as reloading the view,
- copying selected text to the clipboard, or pasting into the view, is
- encapsulated within the QAction objects returned by pageAction(). These
- actions can be programmatically triggered using triggerPageAction().
- Alternatively, the actions can be added to a toolbar or a menu directly.
- The web view maintains the state of the returned actions but allows
- modification of action properties such as \l{QAction::}{text} or
- \l{QAction::}{icon}.
+ The widget features a context menu that is tailored to the element at
+ hand, and includes actions useful in a browser. For a custom context menu,
+ or for embedding actions in a menu or toolbar, the individual actions are available
+ via \l pageAction(). The web view maintains the state of the returned actions,
+ but allows modification of action properties such as \l{QAction::}{text} or
+ \l{QAction::}{icon}. The action semantics can also be triggered directly through
+ triggerPageAction().
If you want to provide support for web sites that allow the user to open
new windows, such as pop-up windows, you can subclass QWebEngineView and
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 5ddd1724c..8c8e9fb71 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -49,21 +49,52 @@
#include <QSGAbstractRenderer>
#include <QSGNode>
#include <QWindow>
-#include <private/qsgcontext_p.h>
-#include <private/qsgengine_p.h>
+#include <private/qquickwindow_p.h>
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
#include <private/qwidget_p.h>
namespace QtWebEngineCore {
-static const int MaxTooltipLength = 1024;
+class RenderWidgetHostViewQuickItem : public QQuickItem {
+public:
+ RenderWidgetHostViewQuickItem(RenderWidgetHostViewQtDelegateClient *client) : m_client(client)
+ {
+ setFlag(ItemHasContents, true);
+ }
+protected:
+ void focusInEvent(QFocusEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void focusOutEvent(QFocusEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void keyPressEvent(QKeyEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void keyReleaseEvent(QKeyEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override
+ {
+ return m_client->updatePaintNode(oldNode);
+ }
+private:
+ RenderWidgetHostViewQtDelegateClient *m_client;
+};
RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(RenderWidgetHostViewQtDelegateClient *client, QWidget *parent)
- : QOpenGLWidget(parent)
+ : QQuickWidget(parent)
, m_client(client)
- , m_rootNode(new QSGRootNode)
- , m_sgEngine(new QSGEngine)
+ , m_rootItem(new RenderWidgetHostViewQuickItem(client))
, m_isPopup(false)
- , m_clearColor(Qt::white)
{
setFocusPolicy(Qt::StrongFocus);
@@ -73,6 +104,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
+#ifndef QT_NO_OPENGL
QOpenGLContext *globalSharedContext = QOpenGLContext::globalShareContext();
if (globalSharedContext) {
QSurfaceFormat sharedFormat = globalSharedContext->format();
@@ -91,7 +123,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
}
#endif
- // Make sure the OpenGL profile of the QOpenGLWidget matches the shared context profile.
+ // Make sure the OpenGL profile of the QQuickWidget matches the shared context profile.
if (sharedFormat.profile() == QSurfaceFormat::CoreProfile) {
format.setMajorVersion(sharedFormat.majorVersion());
format.setMinorVersion(sharedFormat.minorVersion());
@@ -101,7 +133,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
setFormat(format);
#endif
-
+#endif
setMouseTracking(true);
setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_OpaquePaintEvent);
@@ -125,6 +157,8 @@ void RenderWidgetHostViewQtDelegateWidget::removeParentBeforeParentDelete()
void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* container)
{
+ setContent(QUrl(), nullptr, m_rootItem.data());
+
QWebEnginePagePrivate *pagePrivate = static_cast<QWebEnginePagePrivate *>(container);
if (pagePrivate->view) {
pagePrivate->view->layout()->addWidget(this);
@@ -137,6 +171,8 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient*
void RenderWidgetHostViewQtDelegateWidget::initAsPopup(const QRect& screenRect)
{
m_isPopup = true;
+ setContent(QUrl(), nullptr, m_rootItem.data());
+
// The keyboard events are supposed to go to the parent RenderHostView
// so the WebUI popups should never have focus. Besides, if the parent view
// loses focus, WebKit will cause its associated popups (including this one)
@@ -166,12 +202,12 @@ QRectF RenderWidgetHostViewQtDelegateWidget::contentsRect() const
void RenderWidgetHostViewQtDelegateWidget::setKeyboardFocus()
{
- setFocus();
+ m_rootItem->forceActiveFocus();
}
bool RenderWidgetHostViewQtDelegateWidget::hasKeyboardFocus()
{
- return hasFocus();
+ return m_rootItem->hasActiveFocus();
}
void RenderWidgetHostViewQtDelegateWidget::lockMouse()
@@ -189,65 +225,85 @@ void RenderWidgetHostViewQtDelegateWidget::show()
// Check if we're attached to a QWebEngineView, we don't
// want to show anything else than popups as top-level.
if (parent() || m_isPopup) {
- QOpenGLWidget::show();
+ QQuickWidget::show();
}
}
void RenderWidgetHostViewQtDelegateWidget::hide()
{
- QOpenGLWidget::hide();
+ QQuickWidget::hide();
}
bool RenderWidgetHostViewQtDelegateWidget::isVisible() const
{
- return QOpenGLWidget::isVisible();
+ return QQuickWidget::isVisible();
}
QWindow* RenderWidgetHostViewQtDelegateWidget::window() const
{
- const QWidget* root = QOpenGLWidget::window();
+ const QWidget* root = QQuickWidget::window();
return root ? root->windowHandle() : 0;
}
QSGTexture *RenderWidgetHostViewQtDelegateWidget::createTextureFromImage(const QImage &image)
{
- return m_sgEngine->createTextureFromImage(image, QSGEngine::TextureCanUseAtlas);
+ return quickWindow()->createTextureFromImage(image, QQuickWindow::TextureCanUseAtlas);
}
QSGLayer *RenderWidgetHostViewQtDelegateWidget::createLayer()
{
- QSGEnginePrivate *enginePrivate = QSGEnginePrivate::get(m_sgEngine.data());
- return enginePrivate->sgContext->createLayer(enginePrivate->sgRenderContext.data());
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+ return renderContext->sceneGraphContext()->createLayer(renderContext);
}
-QSGImageNode *RenderWidgetHostViewQtDelegateWidget::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateWidget::createImageNode()
{
- return QSGEnginePrivate::get(m_sgEngine.data())->sgContext->createImageNode();
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return renderContext->sceneGraphContext()->createInternalImageNode();
+#else
+ return renderContext->sceneGraphContext()->createImageNode();
+#endif
}
-void RenderWidgetHostViewQtDelegateWidget::update()
+QSGTextureNode *RenderWidgetHostViewQtDelegateWidget::createTextureNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return quickWindow()->createImageNode();
+#else
+ return new QSGSimpleTextureNode();
+#endif
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateWidget::createRectangleNode()
{
-#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
- updateGL();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return quickWindow()->createRectangleNode();
#else
- QOpenGLWidget::update();
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+ return renderContext->sceneGraphContext()->createRectangleNode();
#endif
}
+void RenderWidgetHostViewQtDelegateWidget::update()
+{
+ m_rootItem->update();
+}
+
void RenderWidgetHostViewQtDelegateWidget::updateCursor(const QCursor &cursor)
{
- QOpenGLWidget::setCursor(cursor);
+ QQuickWidget::setCursor(cursor);
}
void RenderWidgetHostViewQtDelegateWidget::resize(int width, int height)
{
- QOpenGLWidget::resize(width, height);
+ QQuickWidget::resize(width, height);
}
void RenderWidgetHostViewQtDelegateWidget::move(const QPoint &screenPos)
{
Q_ASSERT(m_isPopup);
- QOpenGLWidget::move(screenPos);
+ QQuickWidget::move(screenPos);
}
void RenderWidgetHostViewQtDelegateWidget::inputMethodStateChanged(bool editorVisible)
@@ -255,23 +311,15 @@ void RenderWidgetHostViewQtDelegateWidget::inputMethodStateChanged(bool editorVi
if (qApp->inputMethod()->isVisible() == editorVisible)
return;
- QOpenGLWidget::setAttribute(Qt::WA_InputMethodEnabled, editorVisible);
+ QQuickWidget::setAttribute(Qt::WA_InputMethodEnabled, editorVisible);
qApp->inputMethod()->update(Qt::ImQueryInput | Qt::ImEnabled | Qt::ImHints);
qApp->inputMethod()->setVisible(editorVisible);
}
-void RenderWidgetHostViewQtDelegateWidget::setTooltip(const QString &tooltip)
-{
- QString wrappedTip;
- if (!tooltip.isEmpty())
- wrappedTip = QLatin1String("<p>") % tooltip.toHtmlEscaped().left(MaxTooltipLength) % QLatin1String("</p>");
- setToolTip(wrappedTip);
-}
-
void RenderWidgetHostViewQtDelegateWidget::setClearColor(const QColor &color)
{
- m_clearColor = color;
- // QOpenGLWidget is usually blended by punching holes into widgets
+ QQuickWidget::setClearColor(color);
+ // QQuickWidget is usually blended by punching holes into widgets
// above it to simulate the visual stacking order. If we want it to be
// transparent we have to throw away the proper stacking order and always
// blend the complete normal widgets backing store under it.
@@ -288,7 +336,7 @@ QVariant RenderWidgetHostViewQtDelegateWidget::inputMethodQuery(Qt::InputMethodQ
void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent)
{
- QOpenGLWidget::resizeEvent(resizeEvent);
+ QQuickWidget::resizeEvent(resizeEvent);
const QPoint globalPos = mapToGlobal(pos());
if (globalPos != m_lastGlobalPos) {
@@ -301,7 +349,7 @@ void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent
void RenderWidgetHostViewQtDelegateWidget::showEvent(QShowEvent *event)
{
- QOpenGLWidget::showEvent(event);
+ QQuickWidget::showEvent(event);
// We don't have a way to catch a top-level window change with QWidget
// but a widget will most likely be shown again if it changes, so do
// the reconnection at this point.
@@ -318,7 +366,7 @@ void RenderWidgetHostViewQtDelegateWidget::showEvent(QShowEvent *event)
void RenderWidgetHostViewQtDelegateWidget::hideEvent(QHideEvent *event)
{
- QOpenGLWidget::hideEvent(event);
+ QQuickWidget::hideEvent(event);
m_client->notifyHidden();
}
@@ -353,11 +401,25 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
}
}
- if (event->type() == QEvent::ShortcutOverride) {
+ switch (event->type()) {
+ case QEvent::FocusIn:
+ case QEvent::FocusOut:
+ // We forward focus events later, once they have made it to the m_rootItem.
+ return QQuickWidget::event(event);
+ case QEvent::ShortcutOverride:
if (editorActionForKeyEvent(static_cast<QKeyEvent*>(event)) != QWebEnginePage::NoWebAction) {
event->accept();
return true;
}
+ break;
+ case QEvent::DragEnter:
+ case QEvent::DragLeave:
+ case QEvent::DragMove:
+ case QEvent::Drop:
+ // Let the parent handle these events.
+ return false;
+ default:
+ break;
}
QEvent::Type type = event->type();
@@ -379,45 +441,10 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
handled = m_client->forwardEvent(event);
if (!handled)
- return QOpenGLWidget::event(event);
+ return QQuickWidget::event(event);
return true;
}
-void RenderWidgetHostViewQtDelegateWidget::initializeGL()
-{
- m_sgEngine->initialize(QOpenGLContext::currentContext());
- m_sgRenderer.reset(m_sgEngine->createRenderer());
- m_sgRenderer->setRootNode(m_rootNode.data());
- m_sgRenderer->setClearColor(m_clearColor);
-
- // When RenderWidgetHostViewQt::GetScreenInfo is called for the first time, the associated
- // QWindow is NULL, and the screen device pixel ratio can not be queried.
- // Re-initialize the screen information after the QWindow handle is available,
- // so Chromium receives the correct device pixel ratio.
- m_client->windowChanged();
-}
-
-void RenderWidgetHostViewQtDelegateWidget::paintGL()
-{
-#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 1))
- // A workaround for a missing check in 5.3.0 when updating an unparented delegate.
- if (!QOpenGLContext::currentContext())
- return;
-#endif
- QSGNode *paintNode = m_client->updatePaintNode(m_rootNode->firstChild());
- if (paintNode != m_rootNode->firstChild()) {
- delete m_rootNode->firstChild();
- m_rootNode->appendChildNode(paintNode);
- }
-
- QSize deviceSize = size() * devicePixelRatio();
- m_sgRenderer->setDeviceRect(deviceSize);
- m_sgRenderer->setViewportRect(deviceSize);
- m_sgRenderer->setProjectionMatrixToRect(QRectF(QPointF(), size()));
-
- m_sgRenderer->renderScene(defaultFramebufferObject());
-}
-
void RenderWidgetHostViewQtDelegateWidget::onWindowPosChanged()
{
m_lastGlobalPos = mapToGlobal(pos());
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
index c0cbaa172..68e6a176b 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -43,19 +43,12 @@
#include "render_widget_host_view_qt_delegate.h"
#include "web_contents_adapter_client.h"
-#include <QSGAbstractRenderer>
-#include <QSGEngine>
-#include <QSGNode>
-
-#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
-#include <QtWidgets/private/qopenglwidget_p.h>
-#else
-#include <QtWidgets/QOpenGLWidget>
-#endif
+#include <QQuickItem>
+#include <QQuickWidget>
namespace QtWebEngineCore {
-class RenderWidgetHostViewQtDelegateWidget : public QOpenGLWidget, public RenderWidgetHostViewQtDelegate {
+class RenderWidgetHostViewQtDelegateWidget : public QQuickWidget, public RenderWidgetHostViewQtDelegate {
Q_OBJECT
public:
RenderWidgetHostViewQtDelegateWidget(RenderWidgetHostViewQtDelegateClient *client, QWidget *parent = 0);
@@ -74,13 +67,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint &screenPos) Q_DECL_OVERRIDE;
virtual void inputMethodStateChanged(bool editorVisible) Q_DECL_OVERRIDE;
- virtual void setTooltip(const QString &tooltip) Q_DECL_OVERRIDE;
virtual void setClearColor(const QColor &color) Q_DECL_OVERRIDE;
protected:
@@ -88,8 +82,6 @@ protected:
void resizeEvent(QResizeEvent *resizeEvent) Q_DECL_OVERRIDE;
void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
void hideEvent(QHideEvent *) Q_DECL_OVERRIDE;
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
@@ -99,10 +91,7 @@ private slots:
private:
RenderWidgetHostViewQtDelegateClient *m_client;
- // Put the root node first to make sure it gets destroyed after the SG renderer.
- QScopedPointer<QSGRootNode> m_rootNode;
- QScopedPointer<QSGEngine> m_sgEngine;
- QScopedPointer<QSGAbstractRenderer> m_sgRenderer;
+ QScopedPointer<QQuickItem> m_rootItem;
bool m_isPopup;
QColor m_clearColor;
QPoint m_lastGlobalPos;
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index 279ec79f8..64e475422 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -4,7 +4,7 @@ TARGET = QtWebEngineWidgets
DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
QT += webenginecore widgets network quick
-QT_PRIVATE += quick-private gui-private core-private widgets-private
+QT_PRIVATE += quick-private gui-private core-private widgets-private quickwidgets
INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api
@@ -48,7 +48,7 @@ HEADERS = \
DEFINES += QT_UI_DELEGATES
}
-!contains(WEBENGINE_CONFIG, no_spellcheck) {
+contains(WEBENGINE_CONFIG, use_spellchecker) {
DEFINES += ENABLE_SPELLCHECK
}
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 1937dca04..f9fd854cc 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -36,6 +36,7 @@
#include <QtWebEngine/QQuickWebEngineProfile>
#include <private/qquickwebengineview_p.h>
#include <private/qquickwebenginecertificateerror_p.h>
+#include <private/qquickwebenginedialogrequests_p.h>
#include <private/qquickwebenginedownloaditem_p.h>
#include <private/qquickwebenginehistory_p.h>
#include <private/qquickwebengineloadrequest_p.h>
@@ -44,6 +45,7 @@
#include <private/qquickwebenginescript_p.h>
#include <private/qquickwebenginesettings_p.h>
#include <private/qquickwebenginesingleton_p.h>
+#include <private/qquickwebenginecontextmenurequest_p.h>
class tst_publicapi : public QObject {
Q_OBJECT
@@ -65,6 +67,12 @@ static QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *>()
<< &QQuickWebEngineSettings::staticMetaObject
<< &QQuickWebEngineFullScreenRequest::staticMetaObject
<< &QQuickWebEngineSingleton::staticMetaObject
+ << &QQuickWebEngineAuthenticationDialogRequest::staticMetaObject
+ << &QQuickWebEngineJavaScriptDialogRequest::staticMetaObject
+ << &QQuickWebEngineColorDialogRequest::staticMetaObject
+ << &QQuickWebEngineFileDialogRequest::staticMetaObject
+ << &QQuickWebEngineFormValidationMessageRequest::staticMetaObject
+ << &QQuickWebEngineContextMenuRequest::staticMetaObject
;
static QList<const char *> knownEnumNames = QList<const char *>();
@@ -351,6 +359,9 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.printToPdf(QJSValue,PrintedPageSizeId,PrintedPageOrientation) --> void"
<< "QQuickWebEngineView.printToPdf(QJSValue,PrintedPageSizeId) --> void"
<< "QQuickWebEngineView.printToPdf(QJSValue) --> void"
+ << "QQuickWebEngineView.canViewSource --> bool"
+ << "QQuickWebEngineView.replaceMisspelledWord(QString) --> void"
+ << "QQuickWebEngineView.viewSource() --> void"
<< "QQuickWebEngineCertificateError.SslPinnedKeyNotInCertificateChain --> Error"
<< "QQuickWebEngineCertificateError.CertificateCommonNameInvalid --> Error"
<< "QQuickWebEngineCertificateError.CertificateDateInvalid --> Error"
@@ -396,6 +407,12 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineDownloadItem.MimeHtmlSaveFormat --> SavePageFormat"
<< "QQuickWebEngineDownloadItem.savePageFormat --> SavePageFormat"
<< "QQuickWebEngineDownloadItem.savePageFormatChanged() --> void"
+ << "QQuickWebEngineDownloadItem.Attachment --> DownloadType"
+ << "QQuickWebEngineDownloadItem.DownloadAttribute --> DownloadType"
+ << "QQuickWebEngineDownloadItem.UserRequested --> DownloadType"
+ << "QQuickWebEngineDownloadItem.SavePage --> DownloadType"
+ << "QQuickWebEngineDownloadItem.type --> DownloadType"
+ << "QQuickWebEngineDownloadItem.typeChanged() --> void"
<< "QQuickWebEngineHistory.items --> QQuickWebEngineHistoryListModel*"
<< "QQuickWebEngineHistory.backItems --> QQuickWebEngineHistoryListModel*"
<< "QQuickWebEngineHistory.forwardItems --> QQuickWebEngineHistoryListModel*"
@@ -438,6 +455,11 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineProfile.downloadRequested(QQuickWebEngineDownloadItem*) --> void"
<< "QQuickWebEngineProfile.downloadFinished(QQuickWebEngineDownloadItem*) --> void"
<< "QQuickWebEngineProfile.NoCache --> HttpCacheType"
+ << "QQuickWebEngineProfile.spellCheckLanguage --> QString"
+ << "QQuickWebEngineProfile.spellCheckEnabled --> bool"
+ << "QQuickWebEngineProfile.spellCheckLanguageChanged() --> void"
+ << "QQuickWebEngineProfile.spellCheckEnabledChanged() --> void"
+ << "QQuickWebEngineProfile.clearHttpCache() --> void"
<< "QQuickWebEngineScript.Deferred --> InjectionPoint"
<< "QQuickWebEngineScript.DocumentReady --> InjectionPoint"
<< "QQuickWebEngineScript.DocumentCreation --> InjectionPoint"
@@ -501,6 +523,8 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineSettings.accelerated2dCanvasEnabledChanged() --> void"
<< "QQuickWebEngineSettings.autoLoadIconsForPageChanged() --> void"
<< "QQuickWebEngineSettings.touchIconsEnabledChanged() --> void"
+ << "QQuickWebEngineSettings.focusOnNavigationEnabled --> bool"
+ << "QQuickWebEngineSettings.focusOnNavigationEnabledChanged() --> void"
<< "QQuickWebEngineFullScreenRequest.origin --> QUrl"
<< "QQuickWebEngineFullScreenRequest.toggleOn --> bool"
<< "QQuickWebEngineFullScreenRequest.accept() --> void"
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index 035e49a83..d281020df 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -1,6 +1,9 @@
[DesktopWebEngineViewLinkHovered::test_linkHovered]
*
+[DesktopWebEngineViewLinkHovered::test_linkHoveredDoesntEmitRepeated]
+*
+
[WebViewGeopermission::test_deniedGeolocationByUser]
osx
diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
index 0d2a34645..aa1f77942 100644
--- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml
+++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
@@ -27,7 +27,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtTest 1.0
+import QtTest 1.1
import QtWebEngine 1.3
WebEngineView {
@@ -62,7 +62,27 @@ WebEngineView {
return predicate()
}
+ function getActiveElementId() {
+ var activeElementId;
+ runJavaScript("document.activeElement.id", function(result) {
+ activeElementId = result;
+ });
+ testCase.tryVerify(function() { return activeElementId != undefined });
+ return activeElementId;
+ }
+
+ function verifyElementHasFocus(element) {
+ testCase.tryVerify(function() { return getActiveElementId() == element; }, 5000,
+ "Element \"" + element + "\" has focus");
+ }
+
+ function setFocusToElement(element) {
+ runJavaScript("document.getElementById('" + element + "').focus()");
+ verifyElementHasFocus(element);
+ }
+
TestResult { id: testResult }
+ TestCase { id: testCase }
onLoadingChanged: {
loadStatus = loadRequest.status
diff --git a/tests/auto/quick/qmltests/data/favicon-candidates-gray.html b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
index 3cbc4a4c3..ebea35b02 100644
--- a/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
+++ b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
@@ -11,11 +11,11 @@
<h1>Gray Candidate Favicons Test</h1>
<table style="width:100%">
<tr>
- <td align="center"><img src="icons/gray16.png" height="16" width="16" /></td>
- <td align="center"><img src="icons/gray32.png" height="32" width="32" /></td>
- <td align="center"><img src="icons/gray64.png" height="64" width="64" /></td>
- <td align="center"><img src="icons/gray128.png" height="128" width="128" /></td>
- <td align="center"><img src="icons/gray255.png" height="255" width="255" /></td>
+ <td align="center"><img src="icons/gray16.png" height="16" width="16" border="1" /></td>
+ <td align="center"><img src="icons/gray32.png" height="32" width="32" border="1" /></td>
+ <td align="center"><img src="icons/gray64.png" height="64" width="64" border="1" /></td>
+ <td align="center"><img src="icons/gray128.png" height="128" width="128" border="1" /></td>
+ <td align="center"><img src="icons/gray255.png" height="255" width="255" border="1" /></td>
</tr>
<tr>
<td align="center">16x16</td>
diff --git a/tests/auto/quick/qmltests/data/favicon-multi-gray.html b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
index 9b9b7432d..24b71640f 100644
--- a/tests/auto/quick/qmltests/data/favicon-multi-gray.html
+++ b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
@@ -7,11 +7,11 @@
<h1>Gray Multi-sized Favicon Test</h1>
<table style="width:100%">
<tr>
- <td align="center"><img src="icons/gray16.png" height="16" width="16" /></td>
- <td align="center"><img src="icons/gray32.png" height="32" width="32" /></td>
- <td align="center"><img src="icons/gray64.png" height="64" width="64" /></td>
- <td align="center"><img src="icons/gray128.png" height="128" width="128" /></td>
- <td align="center"><img src="icons/gray255.png" height="255" width="255" /></td>
+ <td align="center"><img src="icons/gray16.png" height="16" width="16" border="1" /></td>
+ <td align="center"><img src="icons/gray32.png" height="32" width="32" border="1" /></td>
+ <td align="center"><img src="icons/gray64.png" height="64" width="64" border="1" /></td>
+ <td align="center"><img src="icons/gray128.png" height="128" width="128" border="1" /></td>
+ <td align="center"><img src="icons/gray255.png" height="255" width="255" border="1" /></td>
</tr>
<tr>
<td align="center">16x16</td>
diff --git a/tests/auto/quick/qmltests/data/forms.html b/tests/auto/quick/qmltests/data/forms.html
index 8dc3472f2..18133eca6 100644
--- a/tests/auto/quick/qmltests/data/forms.html
+++ b/tests/auto/quick/qmltests/data/forms.html
@@ -19,10 +19,6 @@
<input type="url" value="invalid" required/>
<input type="submit" name="url_invalid"/>
</form>
- <form>
- <input type="url" value="invalid" title="url_title" required/>
- <input type="submit" name="url_title"/>
- </form>
<form>
<input type="email" required/>
@@ -33,8 +29,12 @@
<input type="submit" name="email_invalid"/>
</form>
<form>
- <input type="email" value="invalid" title="email_title" required/>
- <input type="submit" name="email_title"/>
+ <input type="text" title="empty input" required/>
+ <input type="submit" name="input_empty"/>
+ </form>
+ <form>
+ <input type="text" pattern="Lorem ipsum" value="Lorem Ipsum" title="Should type 'Lorem ipsum'"/>
+ <input type="submit" name="lorem_ipsum"/>
</form>
</body>
</html>
diff --git a/tests/auto/quick/qmltests/data/keyboardEvents.html b/tests/auto/quick/qmltests/data/keyboardEvents.html
new file mode 100644
index 000000000..d536d849f
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/keyboardEvents.html
@@ -0,0 +1,98 @@
+<html>
+<head>
+ <style>
+ div {
+ width: 300px;
+ margin-bottom: 10px;
+ }
+
+ #div_container {
+ display: inline-block;
+ }
+
+ #div_container div {
+ width: 100px;
+ height: 100px;
+ border: 2px solid black;
+ padding: 10px;
+ margin: 0 10px 0 10px;
+ float: left;
+ }
+
+ #div_container div:focus {
+ border: 2px solid red;
+ }
+
+ #form_container span {
+ display: block;
+ padding-bottom: 10px;
+ }
+
+ #form_container label {
+ float: left;
+ text-align: right;
+ width: 50px;
+ margin-right: 20px;
+ }
+ </style>
+</head>
+
+<body onload="document.getElementById('first_div').focus()">
+ <div id="div_container">
+ <div id="first_div" tabindex="0">First</div>
+ <div id="second_div" tabindex="0">Second</div>
+ </div>
+
+ <div id="form_container">
+ <form><fieldset>
+ <legend>Form</legend>
+
+ <span>
+ <label for="text_input">text</label>
+ <input id="text_input" type="text" />
+ </span>
+
+ <span>
+ <input id="radio1" type="radio" name="radio">radio1</input>
+ <input id="radio2" type="radio" name="radio">radio2</input>
+ </span>
+
+ <span>
+ <input id="checkbox1" type="checkbox" name="checkbox1" checked="true">checkbox1</input>
+ <input id="checkbox2" type="checkbox" name="checkbox2" checked="true">checkbox2</input>
+ </span>
+
+ <span>
+ <label for="number_input">number</label>
+ <input id="number_input" type="number" min="0" max="10" value="5" />
+ </span>
+
+ <span>
+ <label for="range_input">range</label>
+ <input id="range_input" type="range" min="0" max="10" value="5" />
+ </span>
+
+ <span>
+ <label for="search_input">search</label>
+ <input id="search_input" type="search" value="test" />
+ </span>
+
+ <input id="submit_button" type="submit" value="Submit" />
+ </fieldset></form>
+ </div>
+
+ <div>
+ <select id="combobox">
+ <option value="a">a</option>
+ <option value="b">b</option>
+ <option value="c">c</option>
+ </select>
+ </div>
+
+ <div>
+ <a id="first_hyperlink" href="">First</a>
+ <br />
+ <a id="second_hyperlink" href="">Second</a>
+ </div>
+</body>
+</html>
diff --git a/tests/auto/quick/qmltests/data/redirect.html b/tests/auto/quick/qmltests/data/redirect.html
index 914e5e35a..44eb6cd28 100644
--- a/tests/auto/quick/qmltests/data/redirect.html
+++ b/tests/auto/quick/qmltests/data/redirect.html
@@ -1,8 +1,9 @@
<!doctype html>
<html>
<head>
-<meta http-equiv="refresh" content="2; url=test1.html"
+ <meta http-equiv="refresh" content="2; url=test1.html">
</head>
<body>
+ Redirecting to test1.html
</body>
</html>
diff --git a/tests/auto/quick/qmltests/data/script-with-metadata.js b/tests/auto/quick/qmltests/data/script-with-metadata.js
new file mode 100644
index 000000000..4dcf50f55
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/script-with-metadata.js
@@ -0,0 +1,10 @@
+// ==UserScript==
+// @name Test script
+// @homepageURL http://www.qt.io/
+// @description Test script with metadata block
+// @include *test*.html
+// @exclude *test2.html
+// @run-at document-end
+// ==/UserScript==
+
+document.title = "New title";
diff --git a/tests/auto/quick/qmltests/data/test3.html b/tests/auto/quick/qmltests/data/test3.html
index 0c0e4eebf..f09d06d45 100644
--- a/tests/auto/quick/qmltests/data/test3.html
+++ b/tests/auto/quick/qmltests/data/test3.html
@@ -5,7 +5,7 @@
<script type="text/javascript">
function kickOffTitleChange()
{
- var t = setTimeout("changeTitle('New Title')",3000);
+ var t = setTimeout("changeTitle('New Title')",500);
}
function changeTitle(title)
{
diff --git a/tests/auto/quick/qmltests/data/tst_download.qml b/tests/auto/quick/qmltests/data/tst_download.qml
index 7d1e24b4d..e4e93b993 100644
--- a/tests/auto/quick/qmltests/data/tst_download.qml
+++ b/tests/auto/quick/qmltests/data/tst_download.qml
@@ -114,7 +114,7 @@ TestWebEngineView {
compare(downloadState[1], WebEngineDownloadItem.DownloadInProgress)
downloadFinishedSpy.wait()
compare(totalBytes, receivedBytes)
- tryCompare(downloadState, 2, WebEngineDownloadItem.DownloadCompleted)
+ tryCompare(downloadState, "2", WebEngineDownloadItem.DownloadCompleted)
}
function test_downloadCancelled() {
diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml
index 904a8feb2..4761513c1 100644
--- a/tests/auto/quick/qmltests/data/tst_findText.qml
+++ b/tests/auto/quick/qmltests/data/tst_findText.qml
@@ -107,5 +107,24 @@ TestWebEngineView {
tryCompare(webEngineView, "matchCount", 0)
verify(findFailed)
}
+
+ function test_findTextAfterNotFound() {
+ var findFlags = 0
+ webEngineView.url = Qt.resolvedUrl("about:blank")
+ verify(webEngineView.waitForLoadSucceeded())
+
+ webEngineView.clear()
+ webEngineView.findText("hello", findFlags, webEngineView.findTextCallback)
+ tryCompare(webEngineView, "matchCount", 0)
+ verify(findFailed)
+
+ webEngineView.url = Qt.resolvedUrl("test1.html")
+ verify(webEngineView.waitForLoadSucceeded())
+
+ webEngineView.clear()
+ webEngineView.findText("hello", findFlags, webEngineView.findTextCallback)
+ tryCompare(webEngineView, "matchCount", 1)
+ verify(!findFailed)
+ }
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml b/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml
new file mode 100644
index 000000000..93410a727
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/tst_focusOnNavigation.qml
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtTest 1.0
+import QtWebEngine 1.4
+
+Item {
+ id: container
+ width: 500
+ height: 300
+
+ Row {
+ id: row
+ spacing: 1
+
+ Rectangle {
+ anchors.top: row.top
+ anchors.topMargin: 7
+ width: input.width
+ height: input.height
+ border.color: "black"
+ border.width: 1
+
+ TextInput {
+ id: input
+ width: 80
+ height: 20
+ verticalAlignment: TextInput.AlignVCenter
+ horizontalAlignment: TextInput.AlignHCenter
+ text: "Text"
+ }
+ }
+
+ TestWebEngineView {
+ id: webView
+ width: 300
+ height: 300
+ }
+ }
+
+ TestCase {
+ name: "WebEngineViewFocusOnNavigation"
+ when: windowShown
+
+ function test_focusOnNavigation_data() {
+ return [
+ {tag: "focusOnNavigation true", focusOnNavigation: true,
+ viewReceivedFocus: true },
+ {tag: "focusOnNavigation false", focusOnNavigation: false,
+ viewReceivedFocus: false },
+ ]
+ }
+
+ function loadAndTriggerFocusAndCompare(data) {
+ verify(webView.waitForLoadSucceeded());
+ webView.setFocusToElement("input");
+ compare(webView.activeFocus, data.viewReceivedFocus);
+ }
+
+ function test_focusOnNavigation(data) {
+ // TextInput awlays has initial focus.
+ input.forceActiveFocus();
+
+ // Set focusOnNavigation property to current testing value.
+ webView.settings.focusOnNavigationEnabled = data.focusOnNavigation;
+
+ // Load the content, invoke javascript focus on the view, and check which widget has
+ // focus.
+ webView.loadHtml("<html><head><title>Title</title></head><body>Hello" +
+ "<input id=\"input\" type=\"text\"></body></html>");
+ loadAndTriggerFocusAndCompare(data);
+
+ // Load a different page, and check focus.
+ webView.loadHtml("<html><head><title>Title</title></head><body>Hello 2" +
+ "<input id=\"input\" type=\"text\"></body></html>");
+ loadAndTriggerFocusAndCompare(data);
+
+ // Navigate to previous page in history, check focus.
+ webView.triggerWebAction(WebEngineView.Back)
+ loadAndTriggerFocusAndCompare(data);
+
+ // Navigate to next page in history, check focus.
+ webView.triggerWebAction(WebEngineView.Forward)
+ loadAndTriggerFocusAndCompare(data);
+
+ // Reload page, check focus.
+ webView.triggerWebAction(WebEngineView.Reload)
+ loadAndTriggerFocusAndCompare(data);
+
+ // Reload page bypassing cache, check focus.
+ webView.triggerWebAction(WebEngineView.ReloadAndBypassCache)
+ loadAndTriggerFocusAndCompare(data);
+
+ // Manually forcing focus on web view should work.
+ webView.forceActiveFocus()
+ compare(webView.activeFocus, true)
+ }
+ }
+}
diff --git a/tests/auto/quick/qmltests/data/tst_formValidation.qml b/tests/auto/quick/qmltests/data/tst_formValidation.qml
index 6da8af7ff..cae41821c 100644
--- a/tests/auto/quick/qmltests/data/tst_formValidation.qml
+++ b/tests/auto/quick/qmltests/data/tst_formValidation.qml
@@ -71,15 +71,6 @@ TestWebEngineView {
keyPress(Qt.Key_Enter)
showSpy.wait()
compare(showSpy.signalArguments[1][0], "Please enter a URL.")
-
- webEngineView.url = Qt.resolvedUrl("about:blank")
- verify(webEngineView.waitForLoadSucceeded())
-
- webEngineView.url = Qt.resolvedUrl("forms.html#url_title")
- verify(webEngineView.waitForLoadSucceeded())
- keyPress(Qt.Key_Enter)
- showSpy.wait()
- compare(showSpy.signalArguments[2][1], "url_title")
}
function test_emailForm() {
@@ -97,15 +88,26 @@ TestWebEngineView {
keyPress(Qt.Key_Enter)
showSpy.wait()
compare(showSpy.signalArguments[1][0], "Please include an '@' in the email address. 'invalid' is missing an '@'.")
+ }
+
+ function test_textForm() {
+ webEngineView.url = Qt.resolvedUrl("forms.html#input_empty")
+ verify(webEngineView.waitForLoadSucceeded())
+ keyPress(Qt.Key_Enter)
+ showSpy.wait()
+ compare(showSpy.signalArguments[0][0], "Please fill out this field.")
+ // Title should be shown for pattern mismatch only
+ compare(showSpy.signalArguments[0][1], "")
webEngineView.url = Qt.resolvedUrl("about:blank")
verify(webEngineView.waitForLoadSucceeded())
- webEngineView.url = Qt.resolvedUrl("forms.html#email_title")
+ webEngineView.url = Qt.resolvedUrl("forms.html#lorem_ipsum")
verify(webEngineView.waitForLoadSucceeded())
keyPress(Qt.Key_Enter)
showSpy.wait()
- compare(showSpy.signalArguments[2][1], "email_title")
+ compare(showSpy.signalArguments[1][0], "Please match the requested format.")
+ compare(showSpy.signalArguments[1][1], "Should type 'Lorem ipsum'")
}
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml b/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml
new file mode 100644
index 000000000..677727632
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/tst_keyboardEvents.qml
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtWebEngine 1.4
+
+TestWebEngineView {
+ id: webEngineView
+ width: 350
+ height: 480
+
+ TestCase {
+ name: "WebEngineViewKeyboardEvents"
+ when: windowShown
+
+ function isElementChecked(element) {
+ var elementChecked;
+ runJavaScript("document.getElementById('" + element + "').checked", function(result) {
+ elementChecked = result;
+ });
+ tryVerify(function() { return elementChecked != undefined; });
+ return elementChecked;
+ }
+
+ function verifyElementChecked(element, expected) {
+ tryVerify(function() { return expected == isElementChecked(element); }, 5000,
+ "Element \"" + element + "\" is " + (expected ? "" : "not") + " checked");
+ }
+
+ function getElementValue(element) {
+ var elementValue;
+ runJavaScript("document.getElementById('" + element + "').value", function(result) {
+ elementValue = result;
+ });
+ tryVerify(function() { return elementValue != undefined; });
+ return elementValue;
+ }
+
+ function compareElementValue(element, expected) {
+ tryVerify(function() { return expected == getElementValue(element); }, 5000,
+ "Value of element \"" + element + "\" is \"" + expected + "\"");
+ }
+
+ function test_keyboardEvents() {
+ webEngineView.url = Qt.resolvedUrl("keyboardEvents.html");
+ verify(webEngineView.waitForLoadSucceeded());
+
+ var elements = [
+ "first_div", "second_div",
+ "text_input", "radio1", "checkbox1", "checkbox2",
+ "number_input", "range_input", "search_input",
+ "submit_button", "combobox", "first_hyperlink", "second_hyperlink"
+ ];
+
+ // Iterate over the elements of the test page with the Tab key. This tests whether any
+ // element blocks the in-page navigation by Tab.
+ for (var i = 0; i < elements.length; ++i) {
+ verifyElementHasFocus(elements[i])
+ keyPress(Qt.Key_Tab);
+ }
+
+ // Move back to the radio buttons with the Shift+Tab key combination
+ for (var i = 0; i < 10; ++i)
+ keyPress(Qt.Key_Tab, Qt.ShiftModifier);
+ verifyElementHasFocus("radio2");
+
+ // Test the Space key by checking a radio button
+ verifyElementChecked("radio2", false);
+ keyClick(Qt.Key_Space);
+ verifyElementChecked("radio2", true);
+
+ // Test the Left key by switching the radio button
+ verifyElementChecked("radio1", false);
+ keyPress(Qt.Key_Left);
+ verifyElementHasFocus("radio1");
+ verifyElementChecked("radio1", true);
+
+ // Test the Space key by unchecking a checkbox
+ setFocusToElement("checkbox1");
+ verifyElementChecked("checkbox1", true);
+ keyClick(Qt.Key_Space);
+ verifyElementChecked("checkbox1", false);
+
+ // Test the Up and Down keys by changing the value of a spinbox
+ setFocusToElement("number_input");
+ compareElementValue("number_input", 5);
+ keyPress(Qt.Key_Up);
+ compareElementValue("number_input", 6);
+ keyPress(Qt.Key_Down);
+ compareElementValue("number_input", 5);
+
+ // Test the Left, Right, Home, PageUp, End and PageDown keys by changing the value of a slider
+ setFocusToElement("range_input");
+ compareElementValue("range_input", 5);
+ keyPress(Qt.Key_Left);
+ compareElementValue("range_input", 4);
+ keyPress(Qt.Key_Right);
+ compareElementValue("range_input", 5);
+ keyPress(Qt.Key_Home);
+ compareElementValue("range_input", 0);
+ keyPress(Qt.Key_PageUp);
+ compareElementValue("range_input", 1);
+ keyPress(Qt.Key_End);
+ compareElementValue("range_input", 10);
+ keyPress(Qt.Key_PageDown);
+ compareElementValue("range_input", 9);
+
+ // Test the Escape key by removing the content of a search field
+ setFocusToElement("search_input");
+ compareElementValue("search_input", "test");
+ keyPress(Qt.Key_Escape);
+ compareElementValue("search_input", "");
+
+ // Test the alpha keys by changing the values in a combobox
+ setFocusToElement("combobox");
+ compareElementValue("combobox", "a");
+ keyPress(Qt.Key_B);
+ compareElementValue("combobox", "b");
+ // Must wait with the second key press to simulate selection of another element
+ wait(1000);
+ keyPress(Qt.Key_C);
+ compareElementValue("combobox", "c");
+
+ // Test the Enter key by loading a page with a hyperlink
+ setFocusToElement("first_hyperlink");
+ keyPress(Qt.Key_Enter);
+ verify(webEngineView.waitForLoadSucceeded());
+ }
+ }
+}
diff --git a/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml b/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
index 86fb9281c..e0a8c0a41 100644
--- a/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
+++ b/tests/auto/quick/qmltests/data/tst_keyboardModifierMapping.qml
@@ -52,25 +52,26 @@ TestWebEngineView {
onTriggered: parent.when = true
}
+ function getPressedModifiers() {
+ var pressedModifiers;
+ runJavaScript("getPressedModifiers()", function(result) {
+ pressedModifiers = result;
+ });
+ tryVerify(function() { return pressedModifiers != undefined });
+ return pressedModifiers;
+ }
+
function test_keyboardModifierMapping() {
- skip("runJavaScript bug: QTBUG-51746")
webEngineView.url = Qt.resolvedUrl("keyboardModifierMapping.html")
waitForLoadSucceeded();
titleSpy.wait()
- var callbackCalled = false;
// Alt
keyPress(Qt.Key_Alt);
titleSpy.wait()
- runJavaScript("getPressedModifiers()", function(result) {
- compare(result, "alt:pressed ctrl:no meta:no");
- callbackCalled = true;
- });
- wait(100);
- verify(callbackCalled);
+ compare(getPressedModifiers(), "alt:pressed ctrl:no meta:no");
keyRelease(Qt.Key_Alt)
titleSpy.wait()
- callbackCalled = false;
// Ctrl
// On mac Qt automatically translates Meta to Ctrl and vice versa.
@@ -79,36 +80,18 @@ TestWebEngineView {
// For testing we assume that the flag Qt::AA_MacDontSwapCtrlAndMeta is NOT set.
keyPress(Qt.platform.os == "osx" ? Qt.Key_Meta : Qt.Key_Control);
titleSpy.wait()
- runJavaScript("getPressedModifiers()", function(result) {
- compare(result, "alt:released ctrl:pressed meta:no");
- callbackCalled = true;
- });
- wait(100);
- verify(callbackCalled);
+ compare(getPressedModifiers(), "alt:released ctrl:pressed meta:no");
keyRelease(Qt.platform.os == "osx" ? Qt.Key_Meta : Qt.Key_Control);
titleSpy.wait()
- callbackCalled = false;
// Meta (Command on Mac)
keyPress(Qt.platform.os == "osx" ? Qt.Key_Control : Qt.Key_Meta);
titleSpy.wait()
- runJavaScript("getPressedModifiers()", function(result) {
- compare(result, "alt:released ctrl:released meta:pressed");
- callbackCalled = true;
- });
- wait(100);
- verify(callbackCalled);
+ compare(getPressedModifiers(), "alt:released ctrl:released meta:pressed");
keyRelease(Qt.platform.os == "osx" ? Qt.Key_Control : Qt.Key_Meta);
titleSpy.wait()
- callbackCalled = false;
- runJavaScript("getPressedModifiers()", function(result) {
- compare(result, "alt:released ctrl:released meta:released");
- callbackCalled = true;
- });
- wait(100);
- verify(callbackCalled);
- callbackCalled = false;
+ compare(getPressedModifiers(), "alt:released ctrl:released meta:released");
}
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
index 3ce03df70..2a43e1577 100644
--- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
@@ -35,152 +35,249 @@ TestWebEngineView {
width: 400
height: 300
- property var lastUrl
- property bool watchProgress: false
- property int numLoadStarted: 0
- property int numLoadSucceeded: 0
+ property var loadRequestArray: []
- focus: true
-
- onLoadProgressChanged: {
- if (watchProgress && webEngineView.loadProgress != 100) {
- watchProgress = false
- url = ''
- }
+ onLoadingChanged: {
+ loadRequestArray.push({
+ "status": loadRequest.status,
+ "url": loadRequest.url,
+ "activeUrl": webEngineView.url
+ });
}
- onLoadingChanged: {
- if (loadRequest.status == WebEngineView.LoadStartedStatus)
- ++numLoadStarted
- if (loadRequest.status == WebEngineView.LoadSucceededStatus)
- ++numLoadSucceeded
+ function clear() {
+ // Reset loadStatus for waitForLoadSucceded
+ webEngineView.loadStatus = null;
+ loadRequestArray = [];
}
TestCase {
name: "WebEngineViewLoadUrl"
when: windowShown
+ function init() {
+ webEngineView.clear();
+ }
+
function test_loadIgnoreEmptyUrl() {
- var url = Qt.resolvedUrl("test1.html")
-
- webEngineView.url = url
- verify(webEngineView.waitForLoadSucceeded())
- compare(numLoadStarted, 1)
- compare(numLoadSucceeded, 1)
- compare(webEngineView.url, url)
-
- lastUrl = webEngineView.url
- webEngineView.url = ''
- wait(1000)
- compare(numLoadStarted, 1)
- compare(numLoadSucceeded, 1)
- compare(webEngineView.url, lastUrl)
-
- webEngineView.url = 'about:blank'
- verify(webEngineView.waitForLoadSucceeded())
- compare(numLoadStarted, 2)
- compare(numLoadSucceeded, 2)
- compare(webEngineView.url, 'about:blank')
+ var url = Qt.resolvedUrl("test1.html");
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
+ compare(loadRequestArray[0].status, WebEngineView.LoadStartedStatus);
+ compare(loadRequestArray[1].status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequestArray.length, 2);
+ compare(webEngineView.url, url);
+ webEngineView.clear();
+
+ var lastUrl = webEngineView.url;
+ webEngineView.url = "";
+ wait(1000);
+ compare(loadRequestArray.length, 0);
+ compare(webEngineView.url, lastUrl);
+ webEngineView.clear();
+
+ var aboutBlank = "about:blank";
+ webEngineView.url = aboutBlank;
+ verify(webEngineView.waitForLoadSucceeded());
+ compare(loadRequestArray[0].status, WebEngineView.LoadStartedStatus);
+ compare(loadRequestArray[1].status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequestArray.length, 2);
+ compare(webEngineView.url, aboutBlank);
+ webEngineView.clear();
// It shouldn't interrupt any ongoing load when an empty url is used.
- watchProgress = true
- webEngineView.url = url
- webEngineView.waitForLoadSucceeded()
- compare(numLoadStarted, 3)
- compare(numLoadSucceeded, 3)
- verify(!watchProgress)
- compare(webEngineView.url, url)
+ var watchProgress = true;
+ var handleLoadProgress = function() {
+ if (webEngineView.loadProgress != 100) {
+ webEngineView.url = "";
+ watchProgress = false;
+ }
+ }
+ webEngineView.loadProgressChanged.connect(handleLoadProgress);
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
+ compare(loadRequestArray[0].status, WebEngineView.LoadStartedStatus);
+ compare(loadRequestArray[1].status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequestArray.length, 2);
+ verify(!watchProgress);
+ compare(webEngineView.url, url);
+ webEngineView.loadProgressChanged.disconnect(handleLoadProgress);
+ webEngineView.clear();
}
function test_urlProperty() {
- WebEngine.settings.errorPageEnabled = false
+ WebEngine.settings.errorPageEnabled = false;
- var url = Qt.resolvedUrl("test1.html")
+ var loadRequest = null;
- webEngineView.url = url
- compare(webEngineView.url, url)
- verify(webEngineView.waitForLoadSucceeded())
- compare(webEngineView.url, url)
+ // Test succeeded load
+ var url = Qt.resolvedUrl("test1.html");
+ webEngineView.url = url;
+ tryCompare(loadRequestArray, "length", 2);
- var bogusSite = "http://www.somesitethatdoesnotexist.abc/"
- webEngineView.url = bogusSite
- compare(webEngineView.url, bogusSite)
- verify(webEngineView.waitForLoadFailed())
- compare(webEngineView.url, url)
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, url);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, url);
+ webEngineView.clear();
+
+ // Test failed load
+ var bogusSite = "http://www.somesitethatdoesnotexist.abc/";
+ webEngineView.url = bogusSite;
+ tryCompare(loadRequestArray, "length", 2);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, bogusSite);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadFailedStatus);
+ compare(loadRequest.activeUrl, url);
+ webEngineView.clear();
+
+ // Test page redirection
+ var redirectUrl = Qt.resolvedUrl("redirect.html");
+ webEngineView.url = redirectUrl;
+ tryCompare(loadRequestArray, "length", 4);
- webEngineView.url = "about:blank" // Reset from previous test
- verify(webEngineView.waitForLoadSucceeded())
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, redirectUrl);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, redirectUrl);
+ loadRequest = loadRequestArray[2];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, redirectUrl);
+ loadRequest = loadRequestArray[3];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, url);
+ webEngineView.clear();
+ // Test clicking on a hyperlink
+ var linkUrl = Qt.resolvedUrl("link.html");
+ webEngineView.url = linkUrl;
+ tryCompare(loadRequestArray, "length", 2);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, linkUrl);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, linkUrl);
+ webEngineView.clear();
+
+ var lastUrl = webEngineView.url;
+ mouseClick(webEngineView, 10, 10, Qt.LeftButton, Qt.NoModifiers, 50);
+ tryCompare(loadRequestArray, "length", 2);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.url, url);
+ compare(loadRequest.activeUrl, lastUrl);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.url, url);
+ compare(loadRequest.activeUrl, url);
+ webEngineView.clear();
+ }
+
+ function test_loadDataUrl() {
+ WebEngine.settings.errorPageEnabled = false;
+
+ var loadRequest = null;
+
+ // Test load of a data URL
+ var dataUrl = "data:text/html,foo";
+ webEngineView.url = dataUrl;
+ tryCompare(loadRequestArray, "length", 2);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, dataUrl);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, dataUrl);
+ webEngineView.clear();
+
+ // Test loadHtml after a failed load
+ var aboutBlank = "about:blank";
+ webEngineView.url = aboutBlank; // Reset from previous test
+ verify(webEngineView.waitForLoadSucceeded());
+ webEngineView.clear();
+
+ var bogusSite = "http://www.somesitethatdoesnotexist.abc/";
var handleLoadFailed = function(loadRequest) {
if (loadRequest.status == WebEngineView.LoadFailedStatus) {
- webEngineView.loadHtml("load failed", bogusSite)
- // Since the load did not succeed the active url is the
- // url of the previous successful load.
- compare(webEngineView.url, "about:blank")
- compare(loadRequest.url, bogusSite)
+ // loadHtml constructs data URL
+ webEngineView.loadHtml("load failed", bogusSite);
+ compare(loadRequest.url, bogusSite);
}
}
- webEngineView.loadingChanged.connect(handleLoadFailed)
+ webEngineView.loadingChanged.connect(handleLoadFailed);
webEngineView.url = bogusSite
- compare(webEngineView.url, bogusSite)
- verify(webEngineView.waitForLoadSucceeded())
- compare(webEngineView.url, bogusSite)
- webEngineView.loadingChanged.disconnect(handleLoadFailed)
-
- var dataUrl = "data:text/html,foo"
- webEngineView.url = dataUrl
- compare(webEngineView.url, dataUrl)
- verify(webEngineView.waitForLoadSucceeded()) // data:text/html,foo is loaded
- compare(webEngineView.url, dataUrl)
-
- var redirectUrl = Qt.resolvedUrl("redirect.html")
- webEngineView.url = redirectUrl
- compare(webEngineView.url, redirectUrl)
- verify(webEngineView.waitForLoadSucceeded()) // redirect.html is loaded
- compare(webEngineView.url, redirectUrl)
- verify(webEngineView.waitForLoadSucceeded()) // test1.html is loaded
- compare(webEngineView.url, url)
-
- var linkUrl = Qt.resolvedUrl("link.html")
- webEngineView.url = linkUrl
- compare(webEngineView.url, linkUrl)
- verify(webEngineView.waitForLoadSucceeded())
- compare(webEngineView.url, linkUrl)
-
- var handleLoadRequest = function(loadRequest) {
- if (loadRequest.status == WebEngineView.LoadStartedStatus) {
- compare(webEngineView.url, lastUrl)
- compare(loadRequest.url, url)
- }
- if (loadRequest.status == WebEngineView.LoadSuceededStatus) {
- compare(webEngineView.url, loadRequest.url)
- compare(webEngineView.url, url)
- }
- }
- lastUrl = webEngineView.url
- webEngineView.loadingChanged.connect(handleLoadRequest)
- mouseClick(webEngineView, 10, 10, Qt.LeftButton, Qt.NoModifiers, 50)
- verify(webEngineView.waitForLoadSucceeded())
- compare(webEngineView.url, url)
- webEngineView.loadingChanged.disconnect(handleLoadRequest)
+ tryCompare(loadRequestArray, "length", 4);
+ webEngineView.loadingChanged.disconnect(handleLoadFailed);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, bogusSite);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadFailedStatus);
+ // Since the load did not succeed the active url is the
+ // URL of the previous successful load.
+ compare(loadRequest.activeUrl, aboutBlank);
+ loadRequest = loadRequestArray[2];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.activeUrl, aboutBlank);
+ loadRequest = loadRequestArray[3];
+ compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
+ compare(loadRequest.activeUrl, bogusSite);
+ webEngineView.clear();
+ }
+
+ function test_QTBUG_56661() {
+ var url = Qt.resolvedUrl("test1.html");
+
+ // Warm up phase
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
+
+ // Load data URL
+ var dataUrl = "data:text/html,foo";
+ webEngineView.url = dataUrl;
+ verify(webEngineView.waitForLoadSucceeded());
+
+ // WebEngine should not try to execute user scripts in the
+ // render frame of the warm up phase otherwise the renderer
+ // crashes.
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
}
function test_stopStatus() {
- var url = Qt.resolvedUrl("test1.html")
+ var loadRequest = null;
- var handleLoadRequest = function(loadRequest) {
- if (loadRequest.status == WebEngineView.LoadStoppedStatus) {
- compare(webEngineView.url, url)
- compare(loadRequest.url, url)
- }
+ var handleLoadStarted = function(loadRequest) {
+ if (loadRequest.status == WebEngineView.LoadStartedStatus)
+ webEngineView.stop();
}
- webEngineView.loadingChanged.connect(handleLoadRequest)
- webEngineView.url = url
- compare(webEngineView.url, url)
- webEngineView.stop()
- verify(webEngineView.waitForLoadStopped())
- compare(webEngineView.url, url)
- webEngineView.loadingChanged.disconnect(handleLoadRequest)
+ webEngineView.loadingChanged.connect(handleLoadStarted);
+ var url = Qt.resolvedUrl("test1.html");
+ webEngineView.url = url;
+ tryCompare(loadRequestArray, "length", 2);
+ webEngineView.loadingChanged.disconnect(handleLoadStarted);
+
+ loadRequest = loadRequestArray[0];
+ compare(loadRequest.status, WebEngineView.LoadStartedStatus);
+ compare(loadRequest.url, url);
+ compare(loadRequest.activeUrl, url);
+ loadRequest = loadRequestArray[1];
+ compare(loadRequest.status, WebEngineView.LoadStoppedStatus);
+ compare(loadRequest.url, url);
+ compare(loadRequest.activeUrl, url);
+ webEngineView.clear();
}
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml
new file mode 100644
index 000000000..754a9e018
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtWebEngine 1.2
+
+TestWebEngineView {
+ id: webEngineView
+ width: 200
+ height: 400
+
+ property var newViewRequest: null
+ property var dialog: null
+
+ SignalSpy {
+ id: newViewRequestedSpy
+ target: webEngineView
+ signalName: "newViewRequested"
+ }
+
+ onNewViewRequested: {
+ newViewRequest = {
+ "destination": request.destination,
+ "userInitiated": request.userInitiated
+ };
+
+ dialog = Qt.createQmlObject(
+ "import QtQuick.Window 2.0\n" +
+ "Window {\n" +
+ " width: 100; height: 100\n" +
+ " visible: true; flags: Qt.Dialog\n" +
+ " property alias webEngineView: webView\n" +
+ " TestWebEngineView { id: webView; anchors.fill: parent }\n" +
+ "}", webEngineView);
+
+ request.openIn(dialog.webEngineView);
+ }
+
+ TestCase {
+ id: test
+ name: "NewViewRequest"
+ when: windowShown
+
+ function init() {
+ webEngineView.url = Qt.resolvedUrl("about:blank");
+ verify(webEngineView.waitForLoadSucceeded());
+
+ newViewRequestedSpy.clear();
+ newViewRequest = null;
+ }
+
+ function cleanup() {
+ if (dialog)
+ dialog.destroy();
+ }
+
+ function test_jsWindowOpen() {
+ // Open an empty page in a new tab
+ webEngineView.loadHtml(
+ "<html><head><script>" +
+ " function popup() { window.open(''); }" +
+ "</script></head>" +
+ "<body onload='popup()'></body></html>");
+ verify(webEngineView.waitForLoadSucceeded());
+ tryCompare(newViewRequestedSpy, "count", 1);
+
+ compare(newViewRequest.destination, WebEngineView.NewViewInTab);
+ verify(!newViewRequest.userInitiated);
+
+ verify(dialog.webEngineView.waitForLoadSucceeded);
+ compare(dialog.webEngineView.url, "");
+ newViewRequestedSpy.clear();
+ dialog.destroy();
+
+ // Open an empty page in a new dialog
+ webEngineView.loadHtml(
+ "<html><head><script>" +
+ " function popup() { window.open('', '_blank', 'width=200,height=100'); }" +
+ "</script></head>" +
+ "<body onload='popup()'></body></html>");
+ verify(webEngineView.waitForLoadSucceeded());
+ tryCompare(newViewRequestedSpy, "count", 1);
+
+ compare(newViewRequest.destination, WebEngineView.NewViewInDialog);
+ verify(!newViewRequest.userInitiated);
+ verify(dialog.webEngineView.waitForLoadSucceeded);
+ newViewRequestedSpy.clear();
+ dialog.destroy();
+
+ // Open an empty page in a new dialog by user
+ webEngineView.loadHtml(
+ "<html><head><script>" +
+ " function popup() { window.open('', '_blank', 'width=200,height=100'); }" +
+ "</script></head>" +
+ "<body onload=\"document.getElementById('popupButton').focus();\">" +
+ " <button id='popupButton' onclick='popup()'>Pop Up!</button>" +
+ "</body></html>");
+ verify(webEngineView.waitForLoadSucceeded());
+ verifyElementHasFocus("popupButton");
+ keyPress(Qt.Key_Enter);
+ tryCompare(newViewRequestedSpy, "count", 1);
+
+ compare(newViewRequest.destination, WebEngineView.NewViewInDialog);
+ verify(newViewRequest.userInitiated);
+ verify(dialog.webEngineView.waitForLoadSucceeded);
+ newViewRequestedSpy.clear();
+ dialog.destroy();
+ }
+ }
+}
+
diff --git a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
index 2011d2a5c..beeebc049 100644
--- a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
+++ b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
@@ -44,7 +44,6 @@ TestWebEngineView {
TestCase {
name: "WebEngineViewRunJavaScript"
function test_runJavaScript() {
- skip("runJavaScript bug: QTBUG-51746")
var testTitle = "Title to test runJavaScript";
runJavaScript("document.title = \"" + testTitle +"\"");
_waitFor(function() { spy.count > 0; });
diff --git a/tests/auto/quick/qmltests/data/tst_settings.qml b/tests/auto/quick/qmltests/data/tst_settings.qml
index aa3a6dc60..0c37d9569 100644
--- a/tests/auto/quick/qmltests/data/tst_settings.qml
+++ b/tests/auto/quick/qmltests/data/tst_settings.qml
@@ -56,7 +56,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("javascript.html");
verify(webEngineView.waitForLoadSucceeded());
- compare(webEngineView.title, "New Title");
+ tryCompare(webEngineView, "title", "New Title");
}
function test_javascriptDisabled() {
@@ -64,7 +64,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("javascript.html");
verify(webEngineView.waitForLoadSucceeded());
- compare(webEngineView.title, "Original Title");
+ tryCompare(webEngineView, "title", "Original Title");
}
function test_localStorageDisabled() {
@@ -73,7 +73,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("localStorage.html");
verify(webEngineView.waitForLoadSucceeded());
- compare(webEngineView.title, "Original Title");
+ tryCompare(webEngineView, "title", "Original Title");
}
function test_localStorageEnabled() {
@@ -84,7 +84,7 @@ TestWebEngineView {
verify(webEngineView.waitForLoadSucceeded());
webEngineView.reload();
verify(webEngineView.waitForLoadSucceeded());
- compare(webEngineView.title, "New Title");
+ tryCompare(webEngineView, "title", "New Title");
}
function test_settingsAffectCurrentViewOnly() {
@@ -100,8 +100,8 @@ TestWebEngineView {
webEngineView2.url = testUrl;
verify(webEngineView2.waitForLoadSucceeded());
- compare(webEngineView.title, "New Title");
- compare(webEngineView2.title, "New Title");
+ tryCompare(webEngineView, "title", "New Title");
+ tryCompare(webEngineView2, "title", "New Title");
webEngineView.settings.javascriptEnabled = false;
@@ -110,8 +110,8 @@ TestWebEngineView {
webEngineView2.url = testUrl;
verify(webEngineView2.waitForLoadSucceeded());
- compare(webEngineView.title, "Original Title");
- compare(webEngineView2.title, "New Title");
+ tryCompare(webEngineView, "title", "Original Title");
+ tryCompare(webEngineView2, "title", "New Title");
webEngineView2.destroy();
}
diff --git a/tests/auto/quick/qmltests/data/tst_titleChanged.qml b/tests/auto/quick/qmltests/data/tst_titleChanged.qml
index 23361c5f4..7dda5ce33 100644
--- a/tests/auto/quick/qmltests/data/tst_titleChanged.qml
+++ b/tests/auto/quick/qmltests/data/tst_titleChanged.qml
@@ -51,10 +51,14 @@ TestWebEngineView {
var testUrl = Qt.resolvedUrl("test3.html")
webEngineView.url = testUrl
- verify(webEngineView.waitForLoadSucceeded())
+ spyTitle.wait()
+ if (webEngineView.title == "test3.html") {
+ // This title may be emitted during loading
+ spyTitle.clear()
+ spyTitle.wait()
+ }
compare(webEngineView.title, "Test page 3")
spyTitle.clear()
-
spyTitle.wait()
compare(webEngineView.title, "New Title")
}
diff --git a/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml b/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
index 87ef16aa2..906dc1658 100644
--- a/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
+++ b/tests/auto/quick/qmltests/data/tst_unhandledKeyEventPropagation.qml
@@ -68,12 +68,10 @@ Item {
keyPress(Qt.Key_Left)
keyRelease(Qt.Key_Left)
- for (var i = 0; i < 20 && parentItem.releaseEvents.length < 3; i++)
- wait(100)
-
- compare(parentItem.pressEvents.length, 1)
+ tryCompare(parentItem.pressEvents, "length", 1)
compare(parentItem.pressEvents[0], Qt.Key_Left)
- compare(parentItem.releaseEvents.length, 3)
+
+ tryCompare(parentItem.releaseEvents, "length", 3)
compare(parentItem.releaseEvents[0], Qt.Key_A)
compare(parentItem.releaseEvents[1], Qt.Key_Left)
compare(parentItem.releaseEvents[2], Qt.Key_Left)
diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml
index 358e8f56d..88fa6f6e3 100644
--- a/tests/auto/quick/qmltests/data/tst_userScripts.qml
+++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml
@@ -49,6 +49,11 @@ Item {
injectionPoint: WebEngineScript.DocumentReady
}
+ WebEngineScript {
+ id: scriptWithMetadata
+ sourceUrl: Qt.resolvedUrl("script-with-metadata.js")
+ }
+
TestWebEngineView {
id: webEngineView
width: 400
@@ -82,31 +87,31 @@ Item {
function test_oneScript() {
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "Test page 1");
+ tryCompare(webEngineView, "title", "Test page 1");
webEngineView.userScripts = [ changeDocumentTitleScript ];
compare(webEngineView.title, "Test page 1");
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "New title");
+ tryCompare(webEngineView, "title", "New title");
webEngineView.url = Qt.resolvedUrl("test2.html");
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "New title");
+ tryCompare(webEngineView, "title", "New title");
webEngineView.userScripts = [];
compare(webEngineView.title, "New title");
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "Test page with huge link area");
+ tryCompare(webEngineView, "title", "Test page with huge link area");
}
function test_twoScripts() {
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "Test page 1");
+ tryCompare(webEngineView, "title", "Test page 1");
webEngineView.userScripts = [ changeDocumentTitleScript, appendDocumentTitleScript ];
@@ -134,22 +139,39 @@ Item {
function test_setUserScriptsConditionally() {
webEngineViewWithConditionalUserScripts.url = Qt.resolvedUrl("test1.html");
webEngineViewWithConditionalUserScripts.waitForLoadSucceeded();
- compare(webEngineViewWithConditionalUserScripts.title, "New title");
+ tryCompare(webEngineViewWithConditionalUserScripts, "title", "New title");
webEngineViewWithConditionalUserScripts.url = Qt.resolvedUrl("test2.html");
webEngineViewWithConditionalUserScripts.waitForLoadSucceeded();
- compare(webEngineViewWithConditionalUserScripts.title, "Test page with huge link area with appendix");
+ tryCompare(webEngineViewWithConditionalUserScripts, "title", "Test page with huge link area with appendix");
webEngineViewWithConditionalUserScripts.url = Qt.resolvedUrl("test3.html");
webEngineViewWithConditionalUserScripts.waitForLoadSucceeded();
- compare(webEngineViewWithConditionalUserScripts.title, "Test page 3");
+ tryCompare(webEngineViewWithConditionalUserScripts, "title", "Test page 3");
}
function test_bigScript() {
webEngineView.userScripts = [ bigUserScript ];
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "Big user script changed title");
+ tryCompare(webEngineView , "title", "Big user script changed title");
+ }
+
+ function test_parseMetadataHeader() {
+ compare(scriptWithMetadata.name, "Test script");
+ compare(scriptWithMetadata.injectionPoint, WebEngineScript.DocumentReady);
+
+ webEngineView.userScripts = [ scriptWithMetadata ];
+
+ // @include *test*.html
+ webEngineView.url = Qt.resolvedUrl("test1.html");
+ webEngineView.waitForLoadSucceeded();
+ tryCompare(webEngineView, "title", "New title");
+
+ // @exclude *test2.html
+ webEngineView.url = Qt.resolvedUrl("test2.html");
+ webEngineView.waitForLoadSucceeded();
+ tryCompare(webEngineView, "title", "Test page with huge link area");
}
}
}
diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml
new file mode 100644
index 000000000..8076d99f8
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+import QtWebEngine 1.4
+
+TestWebEngineView {
+ id: webEngineView
+ width: 200
+ height: 400
+
+ property var viewRequest: null
+
+ SignalSpy {
+ id: newViewRequestedSpy
+ target: webEngineView
+ signalName: "newViewRequested"
+ }
+
+ SignalSpy {
+ id: titleChangedSpy
+ target: webEngineView
+ signalName: "titleChanged"
+ }
+
+ onNewViewRequested: {
+ viewRequest = {
+ "destination": request.destination,
+ "userInitiated": request.userInitiated
+ };
+
+ request.openIn(webEngineView);
+ }
+
+ TestCase {
+ id: test
+ name: "WebEngineViewSource"
+
+ function init() {
+ webEngineView.url = Qt.resolvedUrl("about:blank");
+ verify(webEngineView.waitForLoadSucceeded());
+
+ newViewRequestedSpy.clear();
+ titleChangedSpy.clear();
+ viewRequest = null;
+ }
+
+ function test_viewSource() {
+ webEngineView.url = Qt.resolvedUrl("test1.html");
+ verify(webEngineView.waitForLoadSucceeded());
+ tryCompare(webEngineView, "title", "Test page 1");
+ // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117
+ //verify(webEngineView.canViewSource, true);
+
+ titleChangedSpy.clear();
+ webEngineView.triggerWebAction(WebEngineView.ViewSource);
+ tryCompare(newViewRequestedSpy, "count", 1);
+ verify(webEngineView.waitForLoadSucceeded());
+ // The first titleChanged signal is emitted by adoptWebContents()
+ tryVerify(function() { return titleChangedSpy.count >= 2; });
+
+ compare(viewRequest.destination, WebEngineView.NewViewInTab);
+ verify(viewRequest.userInitiated);
+ // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117
+ //verify(!webEngineView.canViewSource);
+
+ tryCompare(webEngineView, "title", "test1.html");
+ compare(webEngineView.url, "view-source:" + Qt.resolvedUrl("test1.html"));
+ }
+
+ function test_viewSourceURL_data() {
+ var testLocalUrl = "view-source:" + Qt.resolvedUrl("test1.html");
+ var testLocalUrlWithoutScheme = "view-source:" + Qt.resolvedUrl("test1.html").substring(7);
+
+ return [
+ { tag: "view-source:", userInputUrl: "view-source:", loadSucceed: true, url: "view-source:", title: "view-source:" },
+ { tag: "view-source:about:blank", userInputUrl: "view-source:about:blank", loadSucceed: true, url: "view-source:about:blank", title: "view-source:about:blank" },
+ { tag: testLocalUrl, userInputUrl: testLocalUrl, loadSucceed: true, url: testLocalUrl, title: "test1.html" },
+ { tag: testLocalUrlWithoutScheme, userInputUrl: testLocalUrlWithoutScheme, loadSucceed: true, url: testLocalUrl, title: "test1.html" },
+ { tag: "view-source:http://non.existent", userInputUrl: "view-source:http://non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "http://non.existent/ is not available" },
+ { tag: "view-source:non.existent", userInputUrl: "view-source:non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "http://non.existent/ is not available" },
+ ];
+ }
+
+ function test_viewSourceURL(row) {
+ WebEngine.settings.errorPageEnabled = true
+ webEngineView.url = row.userInputUrl;
+
+ if (row.loadSucceed) {
+ verify(webEngineView.waitForLoadSucceeded());
+ tryVerify(function() { return titleChangedSpy.count >= 1; });
+ } else {
+ verify(webEngineView.waitForLoadFailed());
+ tryVerify(function() { return titleChangedSpy.count >= 2; });
+ }
+
+ compare(webEngineView.url, row.url);
+ tryCompare(webEngineView, "title", row.title);
+ // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117
+ //verify(!webEngineView.canViewSource);
+ }
+ }
+}
+
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml
index 4ba3be4b9..4ba3be4b9 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml
index 9933fc2f7..9933fc2f7 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml
index 5d78807df..5d78807df 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml
index 7c5b16eab..7c5b16eab 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir
index cf8ac0512..cf8ac0512 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir
+++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir
diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro
index 0158a7268..4d4268324 100644
--- a/tests/auto/quick/qmltests/qmltests.pro
+++ b/tests/auto/quick/qmltests/qmltests.pro
@@ -39,12 +39,15 @@ OTHER_FILES += \
$$PWD/data/test3.html \
$$PWD/data/test4.html \
$$PWD/data/keyboardModifierMapping.html \
+ $$PWD/data/keyboardEvents.html \
$$PWD/data/titleupdate.js \
$$PWD/data/tst_desktopBehaviorLoadHtml.qml \
$$PWD/data/tst_download.qml \
$$PWD/data/tst_favicon.qml \
$$PWD/data/tst_faviconDownload.qml \
$$PWD/data/tst_filePicker.qml \
+ $$PWD/data/tst_findText.qml \
+ $$PWD/data/tst_focusOnNavigation.qml \
$$PWD/data/tst_formValidation.qml \
$$PWD/data/tst_geopermission.qml \
$$PWD/data/tst_javaScriptDialogs.qml \
@@ -57,15 +60,18 @@ OTHER_FILES += \
$$PWD/data/tst_loadUrl.qml \
$$PWD/data/tst_navigationHistory.qml \
$$PWD/data/tst_navigationRequested.qml \
+ $$PWD/data/tst_newViewRequest.qml \
$$PWD/data/tst_properties.qml \
$$PWD/data/tst_runJavaScript.qml \
$$PWD/data/tst_scrollPosition.qml \
$$PWD/data/tst_titleChanged.qml \
$$PWD/data/tst_unhandledKeyEventPropagation.qml \
$$PWD/data/tst_userScripts.qml \
+ $$PWD/data/tst_viewSource.qml \
$$PWD/data/tst_webchannel.qml \
$$PWD/data/tst_settings.qml \
$$PWD/data/tst_keyboardModifierMapping.qml \
+ $$PWD/data/tst_keyboardEvents.qml \
$$PWD/data/icons/favicon.png \
$$PWD/data/icons/gray128.png \
$$PWD/data/icons/gray16.png \
diff --git a/tests/auto/quick/qquickwebengineview/BLACKLIST b/tests/auto/quick/qquickwebengineview/BLACKLIST
index d4d5c9844..2cde59454 100644
--- a/tests/auto/quick/qquickwebengineview/BLACKLIST
+++ b/tests/auto/quick/qquickwebengineview/BLACKLIST
@@ -1,2 +1,5 @@
[transparentWebEngineViews]
windows
+
+[inputEventForwardingDisabledWhenActiveFocusOnPressDisabled]
+*
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index b71b9dd08..2d68fd744 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -76,6 +76,8 @@ private Q_SLOTS:
void stopSettingFocusWhenDisabled_data();
void inputEventForwardingDisabledWhenActiveFocusOnPressDisabled();
+ void changeLocale();
+
private:
inline QQuickWebEngineView *newWebEngineView();
inline QQuickWebEngineView *webEngineView() const;
@@ -666,5 +668,40 @@ void tst_QQuickWebEngineView::inputEventForwardingDisabledWhenActiveFocusOnPress
QTRY_COMPARE_WITH_TIMEOUT(view->hasActiveFocus(), true, 1000);
}
+void tst_QQuickWebEngineView::changeLocale()
+{
+ QUrl url("http://non.existent/");
+
+ QLocale::setDefault(QLocale("de"));
+ QQuickWebEngineView *viewDE = newWebEngineView();
+ QSignalSpy titleSpyHU(viewDE, SIGNAL(titleChanged()));
+
+ viewDE->setUrl(url);
+ QVERIFY(waitForLoadFailed(viewDE));
+ QTRY_COMPARE(titleSpyHU.size(), 2);
+ QCOMPARE(viewDE->title(), QStringLiteral("Nicht verf\u00FCgbar: %1").arg(url.toString()));
+
+ QLocale::setDefault(QLocale("en"));
+ QQuickWebEngineView *viewEN = newWebEngineView();
+ QSignalSpy titleSpyEN(viewEN, SIGNAL(titleChanged()));
+
+ viewEN->setUrl(url);
+ QVERIFY(waitForLoadFailed(viewEN));
+ QTRY_COMPARE(titleSpyEN.size(), 2);
+ QCOMPARE(viewEN->title(), QStringLiteral("%1 is not available").arg(url.toString()));
+
+ viewDE->setUrl(QUrl("about:blank"));
+ QVERIFY(waitForLoadSucceeded(viewDE));
+ titleSpyHU.clear();
+
+ viewDE->setUrl(url);
+ QVERIFY(waitForLoadFailed(viewDE));
+ QTRY_COMPARE(titleSpyHU.size(), 2);
+ QCOMPARE(viewDE->title(), QStringLiteral("Nicht verf\u00FCgbar: %1").arg(url.toString()));
+
+ delete viewDE;
+ delete viewEN;
+}
+
QTEST_MAIN(tst_QQuickWebEngineView)
#include "tst_qquickwebengineview.moc"
diff --git a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
index 63ca25396..3ed4bcc71 100644
--- a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
+++ b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
@@ -25,7 +25,7 @@
#include <qwebenginepage.h>
#include <qwidget.h>
-class tst_QWebEngineView : public QObject
+class tst_QWebEngineAccessibility : public QObject
{
Q_OBJECT
@@ -44,27 +44,27 @@ private Q_SLOTS:
// This will be called before the first test function is executed.
// It is only called once.
-void tst_QWebEngineView::initTestCase()
+void tst_QWebEngineAccessibility::initTestCase()
{
}
// This will be called after the last test function is executed.
// It is only called once.
-void tst_QWebEngineView::cleanupTestCase()
+void tst_QWebEngineAccessibility::cleanupTestCase()
{
}
// This will be called before each test function is executed.
-void tst_QWebEngineView::init()
+void tst_QWebEngineAccessibility::init()
{
}
// This will be called after every test function.
-void tst_QWebEngineView::cleanup()
+void tst_QWebEngineAccessibility::cleanup()
{
}
-void tst_QWebEngineView::noPage()
+void tst_QWebEngineAccessibility::noPage()
{
QWebEngineView webView;
webView.show();
@@ -80,7 +80,7 @@ void tst_QWebEngineView::noPage()
QCOMPARE(document->childCount(), 0);
}
-void tst_QWebEngineView::hierarchy()
+void tst_QWebEngineAccessibility::hierarchy()
{
QWebEngineView webView;
webView.setHtml("<html><body>" \
@@ -139,7 +139,7 @@ void tst_QWebEngineView::hierarchy()
QCOMPARE(input, child);
}
-void tst_QWebEngineView::text()
+void tst_QWebEngineAccessibility::text()
{
QWebEngineView webView;
webView.setHtml("<html><body>" \
@@ -207,7 +207,7 @@ void tst_QWebEngineView::text()
QCOMPARE(input3->text(QAccessible::Value), QStringLiteral("Good day!"));
}
-void tst_QWebEngineView::value()
+void tst_QWebEngineAccessibility::value()
{
QWebEngineView webView;
webView.setHtml("<html><body>" \
@@ -248,5 +248,5 @@ void tst_QWebEngineView::value()
static QByteArrayList params = QByteArrayList()
<< "--force-renderer-accessibility";
-W_QTEST_MAIN(tst_QWebEngineView, params)
+W_QTEST_MAIN(tst_QWebEngineAccessibility, params)
#include "tst_qwebengineaccessibility.moc"
diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST
index 2b9453b0e..b1e09777c 100644
--- a/tests/auto/widgets/qwebenginepage/BLACKLIST
+++ b/tests/auto/widgets/qwebenginepage/BLACKLIST
@@ -1,5 +1,8 @@
[comboBoxPopupPositionAfterMove]
-linux
+*
+
+[comboBoxPopupPositionAfterChildMove]
+*
[macCopyUnicodeToClipboard]
osx
diff --git a/tests/auto/widgets/qwebenginepage/resources/test1.html b/tests/auto/widgets/qwebenginepage/resources/test1.html
index b323f966e..5c09f06ed 100644
--- a/tests/auto/widgets/qwebenginepage/resources/test1.html
+++ b/tests/auto/widgets/qwebenginepage/resources/test1.html
@@ -1 +1,6 @@
-<html><body><p>Some text 1</p></body></html>
+<html>
+<head><title>Test page 1</title></head>
+<body>
+Hello.
+</body>
+</html>
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 1629ec617..0b6354cc2 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -43,6 +43,7 @@
#include <qnetworkreply.h>
#include <qnetworkrequest.h>
#include <qpa/qplatforminputcontext.h>
+#include <qwebenginedownloaditem.h>
#include <qwebenginefullscreenrequest.h>
#include <qwebenginehistory.h>
#include <qwebenginepage.h>
@@ -154,15 +155,13 @@ private Q_SLOTS:
void consoleOutput();
void inputMethods_data();
void inputMethods();
- void inputMethodsTextFormat_data();
- void inputMethodsTextFormat();
- void defaultTextEncoding();
void errorPageExtension();
void errorPageExtensionLoadFinished();
void userAgentNewlineStripping();
void undoActionHaveCustomText();
void renderWidgetHostViewNotShowTopLevel();
void getUserMediaRequest();
+ void savePage();
void crashTests_LazyInitializationOfMainFrame();
@@ -183,7 +182,6 @@ private Q_SLOTS:
// [Qt] tst_QWebEnginePage::infiniteLoopJS() timeouts with DFG JIT
// https://bugs.webkit.org/show_bug.cgi?id=79040
// void infiniteLoopJS();
- void navigatorCookieEnabled();
void deleteQWebEngineViewTwice();
void renderOnRepaintRequestedShouldNotRecurse();
void loadSignalsOrder_data();
@@ -242,6 +240,9 @@ private Q_SLOTS:
void mouseButtonTranslation();
void printToPdf();
+ void viewSource();
+ void viewSourceURL_data();
+ void viewSourceURL();
private:
static QPoint elementCenter(QWebEnginePage *page, const QString &id);
@@ -295,6 +296,7 @@ void tst_QWebEnginePage::cleanupFiles()
void tst_QWebEnginePage::initTestCase()
{
+ QLocale::setDefault(QLocale("en"));
cleanupFiles(); // In case there are old files from previous runs
// Set custom path since the CI doesn't install test plugins.
@@ -331,25 +333,25 @@ protected:
void tst_QWebEnginePage::acceptNavigationRequest()
{
- QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool)));
+ QWebEngineView *view = new QWebEngineView();
+ QSignalSpy loadSpy(view, SIGNAL(loadFinished(bool)));
- NavigationRequestOverride* newPage = new NavigationRequestOverride(m_view, false);
- m_view->setPage(newPage);
+ NavigationRequestOverride* newPage = new NavigationRequestOverride(view, false);
+ view->setPage(newPage);
- m_view->setHtml(QString("<html><body><form name='tstform' action='data:text/html,foo'method='get'>"
+ view->setHtml(QString("<html><body><form name='tstform' action='data:text/html,foo'method='get'>"
"<input type='text'><input type='submit'></form></body></html>"), QUrl());
QTRY_COMPARE(loadSpy.count(), 1);
- evaluateJavaScriptSync(m_view->page(), "tstform.submit();");
+ evaluateJavaScriptSync(view->page(), "tstform.submit();");
newPage->m_acceptNavigationRequest = true;
- evaluateJavaScriptSync(m_view->page(), "tstform.submit();");
+ evaluateJavaScriptSync(view->page(), "tstform.submit();");
QTRY_COMPARE(loadSpy.count(), 2);
- QCOMPARE(toPlainTextSync(m_view->page()), QString("foo?"));
+ QCOMPARE(toPlainTextSync(view->page()), QString("foo?"));
- // Restore default page
- m_view->setPage(0);
+ delete view;
}
class JSTestPage : public QWebEnginePage
@@ -416,7 +418,7 @@ void tst_QWebEnginePage::geolocationRequestJS()
newPage, SLOT(requestPermission(const QUrl&, QWebEnginePage::Feature)));
QSignalSpy spyLoadFinished(newPage, SIGNAL(loadFinished(bool)));
- newPage->setHtml(QString("<html><body>test</body></html>"), QUrl());
+ newPage->setHtml(QString("<html><body>test</body></html>"), QUrl("qrc://secure/origin"));
QTRY_COMPARE(spyLoadFinished.count(), 1);
if (evaluateJavaScriptSync(newPage, QLatin1String("!navigator.geolocation")).toBool()) {
delete view;
@@ -460,12 +462,10 @@ void tst_QWebEnginePage::loadFinished()
void tst_QWebEnginePage::actionStates()
{
- QWebEnginePage* page = m_view->page();
+ m_page->load(QUrl("qrc:///resources/script.html"));
- page->load(QUrl("qrc:///resources/script.html"));
-
- QAction* reloadAction = page->action(QWebEnginePage::Reload);
- QAction* stopAction = page->action(QWebEnginePage::Stop);
+ QAction* reloadAction = m_page->action(QWebEnginePage::Reload);
+ QAction* stopAction = m_page->action(QWebEnginePage::Stop);
QTRY_VERIFY(reloadAction->isEnabled());
QTRY_VERIFY(!stopAction->isEnabled());
@@ -557,10 +557,15 @@ public:
virtual QWebEnginePage* createWindow(WebWindowType) {
TestPage* page = new TestPage(this);
createdWindows.append(page);
+ emit windowCreated();
return page;
}
QRect requestedGeometry;
+
+signals:
+ void windowCreated();
+
private Q_SLOTS:
void slotGeometryChangeRequested(const QRect& geom) {
requestedGeometry = geom;
@@ -606,20 +611,26 @@ void tst_QWebEnginePage::acceptNavigationRequestNavigationType()
void tst_QWebEnginePage::popupFormSubmission()
{
TestPage page;
+ QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
+ QSignalSpy windowCreatedSpy(&page, SIGNAL(windowCreated()));
+
page.settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true);
- page.setHtml("<form name=form1 method=get action='' target=myNewWin>"\
- "<input type=hidden name=foo value='bar'>"\
- "</form>");
- page.runJavaScript("window.open('', 'myNewWin', 'width=500,height=300,toolbar=0')");
+ page.setHtml("<form name='form1' method=get action='' target='myNewWin'>"
+ " <input type='hidden' name='foo' value='bar'>"
+ "</form>");
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+
+ page.runJavaScript("window.open('', 'myNewWin', 'width=500,height=300,toolbar=0');");
evaluateJavaScriptSync(&page, "document.form1.submit();");
+ QTRY_COMPARE(windowCreatedSpy.count(), 1);
- QTest::qWait(500);
// The number of popup created should be one.
QVERIFY(page.createdWindows.size() == 1);
- QString url = page.createdWindows.takeFirst()->url().toString();
+ QTRY_VERIFY(!page.createdWindows[0]->url().isEmpty());
+ QString url = page.createdWindows[0]->url().toString();
+
// Check if the form submission was OK.
- QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=118597", Continue);
QVERIFY(url.contains("?foo=bar"));
}
@@ -1412,7 +1423,7 @@ void tst_QWebEnginePage::cursorMovements()
void tst_QWebEnginePage::textSelection()
{
QWebEngineView *view = new QWebEngineView;
- CursorTrackedPage *page = new CursorTrackedPage;
+ CursorTrackedPage *page = new CursorTrackedPage(view);
QString content("<html><body><p id=one>The quick brown fox</p>" \
"<p id=two>jumps over the lazy dog</p>" \
"<p>May the source<br/>be with you!</p></body></html>");
@@ -1512,7 +1523,6 @@ void tst_QWebEnginePage::textSelection()
QCOMPARE(page->action(QWebEnginePage::SelectEndOfDocument)->isEnabled(), true);
#endif
- delete page;
delete view;
}
@@ -2391,61 +2401,6 @@ void tst_QWebEnginePage::inputMethods()
#endif
}
-void tst_QWebEnginePage::inputMethodsTextFormat_data()
-{
- QTest::addColumn<QString>("string");
- QTest::addColumn<int>("start");
- QTest::addColumn<int>("length");
-
- QTest::newRow("") << QString("") << 0 << 0;
- QTest::newRow("Q") << QString("Q") << 0 << 1;
- QTest::newRow("Qt") << QString("Qt") << 0 << 1;
- QTest::newRow("Qt") << QString("Qt") << 0 << 2;
- QTest::newRow("Qt") << QString("Qt") << 1 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 0 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 1 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 2 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 2 << -1;
- QTest::newRow("Qt ") << QString("Qt ") << -2 << 3;
- QTest::newRow("Qt ") << QString("Qt ") << 0 << 3;
- QTest::newRow("Qt by") << QString("Qt by") << 0 << 1;
- QTest::newRow("Qt by Nokia") << QString("Qt by Nokia") << 0 << 1;
-}
-
-
-void tst_QWebEnginePage::inputMethodsTextFormat()
-{
-#if !defined(QINPUTMETHODEVENT_TEXTFORMAT)
- QSKIP("QINPUTMETHODEVENT_TEXTFORMAT");
-#else
- QWebEnginePage* page = new QWebEnginePage;
- QWebEngineView* view = new QWebEngineView;
- view->setPage(page);
- page->settings()->setFontFamily(QWebEngineSettings::SerifFont, "FooSerifFont");
- page->setHtml("<html><body>" \
- "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>");
- evaluateJavaScriptSync(page, "document.getElementById('input1').focus()");
- page->mainFrame()->setFocus();
- view->show();
-
- QFETCH(QString, string);
- QFETCH(int, start);
- QFETCH(int, length);
-
- QList<QInputMethodEvent::Attribute> attrs;
- QTextCharFormat format;
- format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
- format.setUnderlineColor(Qt::red);
- attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format));
- QInputMethodEvent im(string, attrs);
- page->event(&im);
-
- QTest::qWait(1000);
-
- delete view;
-#endif
-}
-
void tst_QWebEnginePage::protectBindingsRuntimeObjectsFromCollector()
{
#if !defined(QWEBENGINEPAGE_CREATEPLUGIN)
@@ -2614,30 +2569,6 @@ void tst_QWebEnginePage::testEnablePersistentStorage()
#endif
}
-void tst_QWebEnginePage::defaultTextEncoding()
-{
- QString defaultCharset = evaluateJavaScriptSync(m_page, "document.defaultCharset").toString();
- QVERIFY(!defaultCharset.isEmpty());
- QCOMPARE(QWebEngineSettings::globalSettings()->defaultTextEncoding(), defaultCharset);
-
- m_page->settings()->setDefaultTextEncoding(QString("utf-8"));
- QCoreApplication::processEvents();
- QString charset = evaluateJavaScriptSync(m_page, "document.defaultCharset").toString();
- QCOMPARE(charset, QString("utf-8"));
- QCOMPARE(m_page->settings()->defaultTextEncoding(), charset);
-
- m_page->settings()->setDefaultTextEncoding(QString());
- QCoreApplication::processEvents();
- charset = evaluateJavaScriptSync(m_page, "document.defaultCharset").toString();
- QVERIFY(!charset.isEmpty());
- QCOMPARE(charset, defaultCharset);
-
- QWebEngineSettings::globalSettings()->setDefaultTextEncoding(QString("utf-8"));
- QCoreApplication::processEvents();
- charset = evaluateJavaScriptSync(m_page, "document.defaultCharset").toString();
- QCOMPARE(charset, QString("utf-8"));
- QCOMPARE(QWebEngineSettings::globalSettings()->defaultTextEncoding(), charset);
-}
#if defined(QWEBENGINEPAGE_ERRORPAGEEXTENSION)
class ErrorPage : public QWebEnginePage
@@ -3070,22 +3001,6 @@ void tst_QWebEnginePage::supportedContentType()
#endif
}
-
-void tst_QWebEnginePage::navigatorCookieEnabled()
-{
-#if !defined(QWEBENGINEPAGE_NETWORKACCESSMANAGER)
- QSKIP("QWEBENGINEPAGE_NETWORKACCESSMANAGER");
-#else
- m_page->networkAccessManager()->setCookieJar(0);
- QVERIFY(!m_page->networkAccessManager()->cookieJar());
- QVERIFY(!evaluateJavaScriptSync(m_page, "navigator.cookieEnabled").toBool());
-
- m_page->networkAccessManager()->setCookieJar(new QNetworkCookieJar());
- QVERIFY(m_page->networkAccessManager()->cookieJar());
- QVERIFY(evaluateJavaScriptSync(m_page, "navigator.cookieEnabled").toBool());
-#endif
-}
-
void tst_QWebEnginePage::thirdPartyCookiePolicy()
{
#if !defined(DUMPRENDERTREESUPPORTQT)
@@ -3500,7 +3415,9 @@ void tst_QWebEnginePage::getUserMediaRequest()
GetUserMediaTestPage *page = new GetUserMediaTestPage();
// We need to load content from a resource in order for the securityOrigin to be valid.
+ QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
page->load(QUrl("qrc:///resources/content.html"));
+ QTRY_COMPARE(loadSpy.count(), 1);
QVERIFY(evaluateJavaScriptSync(page, QStringLiteral("!!navigator.webkitGetUserMedia")).toBool());
evaluateJavaScriptSync(page, QStringLiteral("navigator.webkitGetUserMedia({audio: true}, function() {}, function(){})"));
@@ -3517,9 +3434,45 @@ void tst_QWebEnginePage::getUserMediaRequest()
delete page;
}
+void tst_QWebEnginePage::savePage()
+{
+ QWebEngineView view;
+ QWebEnginePage *page = view.page();
+
+ connect(page->profile(), &QWebEngineProfile::downloadRequested,
+ [] (QWebEngineDownloadItem *item)
+ {
+ connect(item, &QWebEngineDownloadItem::finished,
+ &QTestEventLoop::instance(), &QTestEventLoop::exitLoop, Qt::QueuedConnection);
+ });
+
+ const QString urlPrefix = QStringLiteral("data:text/html,<h1>");
+ const QString text = QStringLiteral("There is Thingumbob shouting!");
+ page->load(QUrl(urlPrefix + text));
+ waitForSignal(page, SIGNAL(loadFinished(bool)));
+ QCOMPARE(toPlainTextSync(page), text);
+
+ // Save the loaded page as HTML.
+ QTemporaryDir tempDir(QDir::tempPath() + "/tst_qwebengineview-XXXXXX");
+ const QString filePath = tempDir.path() + "/thingumbob.html";
+ page->save(filePath, QWebEngineDownloadItem::CompleteHtmlSaveFormat);
+ QTestEventLoop::instance().enterLoop(10);
+
+ // Load something else.
+ page->load(QUrl(urlPrefix + QLatin1String("It's a Snark!")));
+ waitForSignal(page, SIGNAL(loadFinished(bool)));
+ QVERIFY(toPlainTextSync(page) != text);
+
+ // Load the saved page and compare the contents.
+ page->load(QUrl::fromLocalFile(filePath));
+ waitForSignal(page, SIGNAL(loadFinished(bool)));
+ QCOMPARE(toPlainTextSync(page), text);
+}
+
void tst_QWebEnginePage::openWindowDefaultSize()
{
TestPage page;
+ QSignalSpy windowCreatedSpy(&page, SIGNAL(windowCreated()));
QWebEngineView view;
page.setView(&view);
view.show();
@@ -3527,11 +3480,11 @@ void tst_QWebEnginePage::openWindowDefaultSize()
page.settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true);
// Open a default window.
page.runJavaScript("window.open()");
- QTest::qWait(200);
+ QTRY_COMPARE(windowCreatedSpy.count(), 1);
// Open a too small window.
evaluateJavaScriptSync(&page, "window.open('','about:blank','width=10,height=10')");
+ QTRY_COMPARE(windowCreatedSpy.count(), 2);
- QTest::qWait(200);
// The number of popups created should be two.
QCOMPARE(page.createdWindows.size(), 2);
@@ -3751,9 +3704,8 @@ void tst_QWebEnginePage::runJavaScript()
void tst_QWebEnginePage::fullScreenRequested()
{
JavaScriptCallbackWatcher watcher;
- QWebEnginePage* page = new QWebEnginePage;
QWebEngineView* view = new QWebEngineView;
- view->setPage(page);
+ QWebEnginePage* page = view->page();
view->show();
page->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
@@ -3773,7 +3725,7 @@ void tst_QWebEnginePage::fullScreenRequested()
if (acceptRequest) request.accept(); else request.reject();
});
- QTest::keyPress(qApp->focusWindow(), Qt::Key_Space);
+ QTest::keyPress(view->focusProxy(), Qt::Key_Space);
QTRY_VERIFY(evaluateJavaScriptSync(page, "document.webkitIsFullScreen").toBool());
page->runJavaScript("document.webkitExitFullscreen()", JavaScriptCallbackUndefined());
QVERIFY(watcher.wait());
@@ -3781,13 +3733,12 @@ void tst_QWebEnginePage::fullScreenRequested()
acceptRequest = false;
page->runJavaScript("document.webkitFullscreenEnabled", JavaScriptCallback(true));
- QTest::keyPress(qApp->focusWindow(), Qt::Key_Space);
+ QTest::keyPress(view->focusProxy(), Qt::Key_Space);
QVERIFY(watcher.wait());
page->runJavaScript("document.webkitIsFullScreen", JavaScriptCallback(false));
QVERIFY(watcher.wait());
delete view;
- delete page;
}
void tst_QWebEnginePage::symmetricUrl()
@@ -4344,23 +4295,39 @@ void tst_QWebEnginePage::horizontalScrollAfterBack()
#endif
}
+class WebView : public QWebEngineView
+{
+ Q_OBJECT
+signals:
+ void repaintRequested();
+
+protected:
+ bool event(QEvent *event) {
+ if (event->type() == QEvent::UpdateRequest)
+ emit repaintRequested();
+
+ return QWebEngineView::event(event);
+ }
+};
+
void tst_QWebEnginePage::evaluateWillCauseRepaint()
{
-#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT)
- QSKIP("QWEBENGINEPAGE_EVALUATEJAVASCRIPT");
-#else
- QWebEngineView view;
- QString html("<html><body>top<div id=\"junk\" style=\"display: block;\">"
- "junk</div>bottom</body></html>");
- view.setHtml(html);
+ WebView view;
view.show();
-
QTest::qWaitForWindowExposed(&view);
- view.page()->evaluateJavaScript(
- "document.getElementById('junk').style.display = 'none';");
- ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect)));
-#endif
+ QString html("<html><body>"
+ " top"
+ " <div id=\"junk\" style=\"display: block;\">junk</div>"
+ " bottom"
+ "</body></html>");
+
+ QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
+ view.setHtml(html);
+ QTRY_COMPARE(loadSpy.count(), 1);
+
+ evaluateJavaScriptSync(view.page(), "document.getElementById('junk').style.display = 'none';");
+ ::waitForSignal(&view, SIGNAL(repaintRequested()));
}
void tst_QWebEnginePage::setContent_data()
@@ -5009,5 +4976,80 @@ QPoint tst_QWebEnginePage::elementCenter(QWebEnginePage *page, const QString &id
return QPoint(rectList.at(0).toInt(), rectList.at(1).toInt());
}
+void tst_QWebEnginePage::viewSource()
+{
+ TestPage page;
+ QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
+ QSignalSpy windowCreatedSpy(&page, SIGNAL(windowCreated()));
+ const QUrl url("qrc:/resources/test1.html");
+
+ page.load(url);
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QCOMPARE(page.title(), QStringLiteral("Test page 1"));
+ QVERIFY(page.action(QWebEnginePage::ViewSource)->isEnabled());
+
+ page.triggerAction(QWebEnginePage::ViewSource);
+ QTRY_COMPARE(windowCreatedSpy.count(), 1);
+ QCOMPARE(page.createdWindows.size(), 1);
+
+ QTRY_COMPARE(page.createdWindows[0]->url().toString(), QStringLiteral("view-source:%1").arg(url.toString()));
+ // The requested URL should not be about:blank if the qrc scheme is supported
+ QTRY_COMPARE(page.createdWindows[0]->requestedUrl(), url);
+ QTRY_COMPARE(page.createdWindows[0]->title(), QStringLiteral("view-source:%1").arg(url.toString()));
+ QVERIFY(!page.createdWindows[0]->action(QWebEnginePage::ViewSource)->isEnabled());
+}
+
+void tst_QWebEnginePage::viewSourceURL_data()
+{
+ QTest::addColumn<QUrl>("userInputUrl");
+ QTest::addColumn<bool>("loadSucceed");
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QUrl>("requestedUrl");
+ QTest::addColumn<QString>("title");
+
+ QTest::newRow("view-source:") << QUrl("view-source:") << true << QUrl("view-source:") << QUrl("about:blank") << QString("view-source:");
+ QTest::newRow("view-source:about:blank") << QUrl("view-source:about:blank") << true << QUrl("view-source:about:blank") << QUrl("about:blank") << QString("view-source:about:blank");
+
+ QString localFilePath = QString("%1qwebenginepage/resources/test1.html").arg(TESTS_SOURCE_DIR);
+ QUrl testLocalUrl = QUrl(QString("view-source:%1").arg(QUrl::fromLocalFile(localFilePath).toString()));
+ QUrl testLocalUrlWithoutScheme = QUrl(QString("view-source:%1").arg(localFilePath));
+ QTest::newRow(testLocalUrl.toString().toStdString().c_str()) << testLocalUrl << true << testLocalUrl << QUrl::fromLocalFile(localFilePath) << QString("test1.html");
+ QTest::newRow(testLocalUrlWithoutScheme.toString().toStdString().c_str()) << testLocalUrlWithoutScheme << true << testLocalUrl << QUrl::fromLocalFile(localFilePath) << QString("test1.html");
+
+ QString resourcePath = QLatin1String("qrc:/resources/test1.html");
+ QUrl testResourceUrl = QUrl(QString("view-source:%1").arg(resourcePath));
+ QTest::newRow(testResourceUrl.toString().toStdString().c_str()) << testResourceUrl << true << testResourceUrl << QUrl(resourcePath) << testResourceUrl.toString();
+
+ QTest::newRow("view-source:http://non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("http://non.existent/ is not available");
+ QTest::newRow("view-source:non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("http://non.existent/ is not available");
+}
+
+void tst_QWebEnginePage::viewSourceURL()
+{
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ W_QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QFETCH(QUrl, userInputUrl);
+ QFETCH(bool, loadSucceed);
+ QFETCH(QUrl, url);
+ QFETCH(QUrl, requestedUrl);
+ QFETCH(QString, title);
+
+ QWebEnginePage *page = new QWebEnginePage;
+ QSignalSpy loadFinishedSpy(page, SIGNAL(loadFinished(bool)));
+
+ page->load(userInputUrl);
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QList<QVariant> arguments = loadFinishedSpy.takeFirst();
+
+ QCOMPARE(arguments.at(0).toBool(), loadSucceed);
+ QCOMPARE(page->url(), url);
+ QCOMPARE(page->requestedUrl(), requestedUrl);
+ QCOMPARE(page->title(), title);
+ QVERIFY(!page->action(QWebEnginePage::ViewSource)->isEnabled());
+
+ delete page;
+}
+
QTEST_MAIN(tst_QWebEnginePage)
#include "tst_qwebenginepage.moc"
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 579a0f776..093bc2e43 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -52,6 +52,7 @@ private Q_SLOTS:
void customUserAgent();
void httpAcceptLanguage();
void downloadItem();
+ void changePersistentPath();
};
void tst_QWebEngineProfile::defaultProfile()
@@ -375,5 +376,24 @@ void tst_QWebEngineProfile::downloadItem()
QTRY_COMPARE(downloadSpy.count(), 1);
}
+void tst_QWebEngineProfile::changePersistentPath()
+{
+ QWebEngineProfile testProfile(QStringLiteral("Test"));
+ const QString oldPath = testProfile.persistentStoragePath();
+ QVERIFY(oldPath.endsWith(QStringLiteral("Test")));
+
+ // Make sure the profile has been used and the url-request-context-getter instantiated:
+ QWebEnginePage page(&testProfile);
+ QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
+ page.load(QUrl("http://qt-project.org"));
+ if (!loadFinishedSpy.wait(10000) || !loadFinishedSpy.at(0).at(0).toBool())
+ QSKIP("Couldn't load page from network, skipping test.");
+
+ // Test we do not crash (QTBUG-55322):
+ testProfile.setPersistentStoragePath(oldPath + QLatin1Char('2'));
+ const QString newPath = testProfile.persistentStoragePath();
+ QVERIFY(newPath.endsWith(QStringLiteral("Test2")));
+}
+
QTEST_MAIN(tst_QWebEngineProfile)
#include "tst_qwebengineprofile.moc"
diff --git a/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp b/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp
index 0f6a6062e..d8c18e509 100644
--- a/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp
+++ b/tests/auto/widgets/qwebenginesettings/tst_qwebenginesettings.cpp
@@ -27,6 +27,8 @@ class tst_QWebEngineSettings: public QObject {
private Q_SLOTS:
void resetAttributes();
+ void defaultFontFamily_data();
+ void defaultFontFamily();
};
void tst_QWebEngineSettings::resetAttributes()
@@ -58,6 +60,27 @@ void tst_QWebEngineSettings::resetAttributes()
QCOMPARE(defaultSize, settings->fontSize(QWebEngineSettings::MinimumFontSize));
}
+void tst_QWebEngineSettings::defaultFontFamily_data()
+{
+ QTest::addColumn<int>("fontFamily");
+
+ QTest::newRow("StandardFont") << static_cast<int>(QWebEngineSettings::StandardFont);
+ QTest::newRow("FixedFont") << static_cast<int>(QWebEngineSettings::FixedFont);
+ QTest::newRow("SerifFont") << static_cast<int>(QWebEngineSettings::SerifFont);
+ QTest::newRow("SansSerifFont") << static_cast<int>(QWebEngineSettings::SansSerifFont);
+ QTest::newRow("CursiveFont") << static_cast<int>(QWebEngineSettings::CursiveFont);
+ QTest::newRow("FantasyFont") << static_cast<int>(QWebEngineSettings::FantasyFont);
+}
+
+void tst_QWebEngineSettings::defaultFontFamily()
+{
+ QWebEngineProfile profile;
+ QWebEngineSettings *settings = profile.settings();
+
+ QFETCH(int, fontFamily);
+ QVERIFY(!settings->fontFamily(static_cast<QWebEngineSettings::FontFamily>(fontFamily)).isEmpty());
+}
+
QTEST_MAIN(tst_QWebEngineSettings)
#include "tst_qwebenginesettings.moc"
diff --git a/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.aff b/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.aff
new file mode 100644
index 000000000..ff8185771
--- /dev/null
+++ b/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.aff
@@ -0,0 +1,5 @@
+SET UTF-8
+TRY esianrtolcdugmphbyfvkwzqESIANRTOLCDUGMPHBYFVKWZQ
+
+PFX Q Y 1
+PFX Q 0 q .
diff --git a/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.dic b/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.dic
new file mode 100644
index 000000000..d10ae2600
--- /dev/null
+++ b/tests/auto/widgets/qwebenginespellcheck/dict/de-DE.dic
@@ -0,0 +1,14 @@
+15
+du/Q
+er/Q
+es/Q
+ich/Q
+ihr/Q
+liebe/Q
+lieben/Q
+liebst/Q
+liebt/Q
+qt/Q
+sie/Q
+Sie/Q
+wir/Q
diff --git a/tests/auto/widgets/qwebenginespellcheck/qwebenginespellcheck.pro b/tests/auto/widgets/qwebenginespellcheck/qwebenginespellcheck.pro
index 437aad937..a36c82e20 100644
--- a/tests/auto/widgets/qwebenginespellcheck/qwebenginespellcheck.pro
+++ b/tests/auto/widgets/qwebenginespellcheck/qwebenginespellcheck.pro
@@ -2,7 +2,9 @@ include(../tests.pri)
DISTFILES += \
dict/en-US.dic \
- dict/en-US.aff
+ dict/en-US.aff \
+ dict/de-DE.dic \
+ dict/de-DE.aff \
qtPrepareTool(CONVERT_TOOL, qwebengine_convert_dict)
@@ -13,7 +15,7 @@ debug_and_release {
DICTIONARIES_DIR = qtwebengine_dictionaries
}
-dict.files = $$PWD/dict/en-US.dic
+dict.files = $$PWD/dict/en-US.dic $$PWD/dict/de-DE.dic
dictoolbuild.input = dict.files
dictoolbuild.output = $${DICTIONARIES_DIR}/${QMAKE_FILE_BASE}.bdic
dictoolbuild.commands = $${CONVERT_TOOL} ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
diff --git a/tests/auto/widgets/qwebenginespellcheck/tst_qwebenginespellcheck.cpp b/tests/auto/widgets/qwebenginespellcheck/tst_qwebenginespellcheck.cpp
index 2dfe3305d..4db5b9477 100644
--- a/tests/auto/widgets/qwebenginespellcheck/tst_qwebenginespellcheck.cpp
+++ b/tests/auto/widgets/qwebenginespellcheck/tst_qwebenginespellcheck.cpp
@@ -37,12 +37,13 @@ class WebView : public QWebEngineView
{
Q_OBJECT
public:
- void activateMenu(const QPoint &position)
+ void activateMenu(QWidget *widget, const QPoint &position)
{
- QTest::mouseMove(focusWidget(), position);
- QTest::mousePress(focusWidget(), Qt::RightButton, 0, position);
+ QTest::mouseMove(widget, position);
+ QTest::mousePress(widget, Qt::RightButton, 0, position);
QContextMenuEvent evcont(QContextMenuEvent::Mouse, position, mapToGlobal(position));
event(&evcont);
+ QTest::mouseRelease(widget, Qt::RightButton, 0, position);
}
const QWebEngineContextMenuData& data()
@@ -72,8 +73,10 @@ private Q_SLOTS:
void cleanup();
void initTestCase();
void spellCheckLanguage();
+ void spellCheckLanguages();
void spellCheckEnabled();
void spellcheck();
+ void spellcheck_data();
private:
void load();
@@ -85,14 +88,14 @@ void tst_QWebEngineSpellcheck::initTestCase()
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
QVERIFY(profile);
QVERIFY(!profile->isSpellCheckEnabled());
- QVERIFY(profile->spellCheckLanguage().isEmpty());
+ QVERIFY(profile->spellCheckLanguages().isEmpty());
}
void tst_QWebEngineSpellcheck::init()
{
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
profile->setSpellCheckEnabled(false);
- profile->setSpellCheckLanguage(QString::null);
+ profile->setSpellCheckLanguages(QStringList());
m_view = new WebView();
}
@@ -112,10 +115,19 @@ void tst_QWebEngineSpellcheck::spellCheckLanguage()
{
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
QVERIFY(profile);
- profile->setSpellCheckLanguage("en-US");
- QVERIFY(profile->spellCheckLanguage() == "en-US");
+ profile->setSpellCheckLanguages({"en-US"});
+ QVERIFY(profile->spellCheckLanguages() == QStringList({"en-US"}));
}
+void tst_QWebEngineSpellcheck::spellCheckLanguages()
+{
+ QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
+ QVERIFY(profile);
+ profile->setSpellCheckLanguages({"en-US","de-DE"});
+ QVERIFY(profile->spellCheckLanguages() == QStringList({"en-US","de-DE"}));
+}
+
+
void tst_QWebEngineSpellcheck::spellCheckEnabled()
{
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
@@ -126,9 +138,12 @@ void tst_QWebEngineSpellcheck::spellCheckEnabled()
void tst_QWebEngineSpellcheck::spellcheck()
{
+ QFETCH(QStringList, languages);
+ QFETCH(QStringList, suggestions);
+
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
QVERIFY(profile);
- profile->setSpellCheckLanguage("en-US");
+ profile->setSpellCheckLanguages(languages);
profile->setSpellCheckEnabled(true);
load();
@@ -142,6 +157,7 @@ void tst_QWebEngineSpellcheck::spellcheck()
//type text, spellchecker needs time
QTest::mouseMove(m_view->focusWidget(), QPoint(20,20));
QTest::mousePress(m_view->focusWidget(), Qt::LeftButton, 0, QPoint(20,20));
+ QTest::mouseRelease(m_view->focusWidget(), Qt::LeftButton, 0, QPoint(20,20));
QString text("I lovee Qt ....");
for (int i = 0; i < text.length(); i++) {
QTest::keyClicks(m_view->focusWidget(), text.at(i));
@@ -153,7 +169,7 @@ void tst_QWebEngineSpellcheck::spellcheck()
QVERIFY(result == text);
// open menu on misspelled word
- m_view->activateMenu(rect.center());
+ m_view->activateMenu(m_view->focusWidget(), rect.center());
waitForSignal(m_view, SIGNAL(menuReady()));
// check if menu is valid
@@ -164,14 +180,20 @@ void tst_QWebEngineSpellcheck::spellcheck()
QVERIFY(m_view->data().misspelledWord() == "lovee");
// check suggestions
- QStringList expected {"love", "loves"};
- QVERIFY(m_view->data().spellCheckerSuggestions() == expected);
+ QVERIFY(m_view->data().spellCheckerSuggestions() == suggestions);
// check replace word
m_view->page()->replaceMisspelledWord("love");
text = "I love Qt ....";
- result = evaluateJavaScriptSync(m_view->page(), "text();").toString();
- QVERIFY(result == text);
+ QTRY_VERIFY(evaluateJavaScriptSync(m_view->page(), "text();").toString() == text);
+}
+
+void tst_QWebEngineSpellcheck::spellcheck_data()
+{
+ QTest::addColumn<QStringList>("languages");
+ QTest::addColumn<QStringList>("suggestions");
+ QTest::newRow("en-US") << QStringList({"en-US"}) << QStringList({"love", "loves"});
+ QTest::newRow("en-US,de-DE") << QStringList({"en-US","de-DE"}) << QStringList({"love", "liebe", "loves"});
}
QTEST_MAIN(tst_QWebEngineSpellcheck)
diff --git a/tests/auto/widgets/qwebengineview/resources/keyboardEvents.html b/tests/auto/widgets/qwebengineview/resources/keyboardEvents.html
new file mode 100644
index 000000000..d536d849f
--- /dev/null
+++ b/tests/auto/widgets/qwebengineview/resources/keyboardEvents.html
@@ -0,0 +1,98 @@
+<html>
+<head>
+ <style>
+ div {
+ width: 300px;
+ margin-bottom: 10px;
+ }
+
+ #div_container {
+ display: inline-block;
+ }
+
+ #div_container div {
+ width: 100px;
+ height: 100px;
+ border: 2px solid black;
+ padding: 10px;
+ margin: 0 10px 0 10px;
+ float: left;
+ }
+
+ #div_container div:focus {
+ border: 2px solid red;
+ }
+
+ #form_container span {
+ display: block;
+ padding-bottom: 10px;
+ }
+
+ #form_container label {
+ float: left;
+ text-align: right;
+ width: 50px;
+ margin-right: 20px;
+ }
+ </style>
+</head>
+
+<body onload="document.getElementById('first_div').focus()">
+ <div id="div_container">
+ <div id="first_div" tabindex="0">First</div>
+ <div id="second_div" tabindex="0">Second</div>
+ </div>
+
+ <div id="form_container">
+ <form><fieldset>
+ <legend>Form</legend>
+
+ <span>
+ <label for="text_input">text</label>
+ <input id="text_input" type="text" />
+ </span>
+
+ <span>
+ <input id="radio1" type="radio" name="radio">radio1</input>
+ <input id="radio2" type="radio" name="radio">radio2</input>
+ </span>
+
+ <span>
+ <input id="checkbox1" type="checkbox" name="checkbox1" checked="true">checkbox1</input>
+ <input id="checkbox2" type="checkbox" name="checkbox2" checked="true">checkbox2</input>
+ </span>
+
+ <span>
+ <label for="number_input">number</label>
+ <input id="number_input" type="number" min="0" max="10" value="5" />
+ </span>
+
+ <span>
+ <label for="range_input">range</label>
+ <input id="range_input" type="range" min="0" max="10" value="5" />
+ </span>
+
+ <span>
+ <label for="search_input">search</label>
+ <input id="search_input" type="search" value="test" />
+ </span>
+
+ <input id="submit_button" type="submit" value="Submit" />
+ </fieldset></form>
+ </div>
+
+ <div>
+ <select id="combobox">
+ <option value="a">a</option>
+ <option value="b">b</option>
+ <option value="c">c</option>
+ </select>
+ </div>
+
+ <div>
+ <a id="first_hyperlink" href="">First</a>
+ <br />
+ <a id="second_hyperlink" href="">Second</a>
+ </div>
+</body>
+</html>
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index afb53ba20..9966ad9ee 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -31,6 +31,8 @@
#include <qdiriterator.h>
#include <qstackedlayout.h>
#include <qtemporarydir.h>
+#include <QLineEdit>
+#include <QHBoxLayout>
#define VERIFY_INPUTMETHOD_HINTS(actual, expect) \
QVERIFY(actual == expect);
@@ -74,6 +76,13 @@ private Q_SLOTS:
void doNotSendMouseKeyboardEventsWhenDisabled_data();
void stopSettingFocusWhenDisabled();
void stopSettingFocusWhenDisabled_data();
+ void focusOnNavigation_data();
+ void focusOnNavigation();
+
+ void changeLocale();
+ void inputMethodsTextFormat_data();
+ void inputMethodsTextFormat();
+ void keyboardEvents();
};
// This will be called before the first test function is executed.
@@ -357,23 +366,21 @@ void tst_QWebEngineView::unhandledKeyEventPropagation()
evaluateJavaScriptSync(webView.page(), "document.body.firstChild.focus()");
- QTest::sendKeyEvent(QTest::Press, parentWidget.windowHandle(), Qt::Key_A, 'a', Qt::NoModifier);
- QTest::sendKeyEvent(QTest::Release, parentWidget.windowHandle(), Qt::Key_A, 'a', Qt::NoModifier);
- QTest::sendKeyEvent(QTest::Press, parentWidget.windowHandle(), Qt::Key_Left, QString(), Qt::NoModifier);
- QTest::sendKeyEvent(QTest::Release, parentWidget.windowHandle(), Qt::Key_Left, QString(), Qt::NoModifier);
- QTest::sendKeyEvent(QTest::Press, parentWidget.windowHandle(), Qt::Key_Left, QString(), Qt::NoModifier);
- QTest::sendKeyEvent(QTest::Release, parentWidget.windowHandle(), Qt::Key_Left, QString(), Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Press, webView.focusProxy(), Qt::Key_A, 'a', Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Release, webView.focusProxy(), Qt::Key_A, 'a', Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Press, webView.focusProxy(), Qt::Key_Left, QString(), Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Release, webView.focusProxy(), Qt::Key_Left, QString(), Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Press, webView.focusProxy(), Qt::Key_Left, QString(), Qt::NoModifier);
+ QTest::sendKeyEvent(QTest::Release, webView.focusProxy(), Qt::Key_Left, QString(), Qt::NoModifier);
// All this happens asychronously, wait for the last release event to know when we're done.
- for (int i = 0; i < 20 && parentWidget.releaseEvents.size() < 3; ++i)
- QTest::qWait(100);
+ QTRY_COMPARE(parentWidget.releaseEvents.size(), 3);
// The page will consume the 'a' and the first left key presses, the second left won't be
// used since the cursor will already be at the left end of the text input.
// Key releases will all come back unconsumed.
QCOMPARE(parentWidget.pressEvents.size(), 1);
QCOMPARE(parentWidget.pressEvents[0].key(), (int)Qt::Key_Left);
- QCOMPARE(parentWidget.releaseEvents.size(), 3);
QCOMPARE(parentWidget.releaseEvents[0].key(), (int)Qt::Key_A);
QCOMPARE(parentWidget.releaseEvents[1].key(), (int)Qt::Key_Left);
QCOMPARE(parentWidget.releaseEvents[2].key(), (int)Qt::Key_Left);
@@ -743,5 +750,269 @@ void tst_QWebEngineView::stopSettingFocusWhenDisabled_data()
QTest::newRow("disabled view does not get focus") << false << false;
}
+void tst_QWebEngineView::focusOnNavigation_data()
+{
+ QTest::addColumn<bool>("focusOnNavigation");
+ QTest::addColumn<bool>("viewReceivedFocus");
+ QTest::newRow("focusOnNavigation true") << true << true;
+ QTest::newRow("focusOnNavigation false") << false << false;
+}
+
+void tst_QWebEngineView::focusOnNavigation()
+{
+ QFETCH(bool, focusOnNavigation);
+ QFETCH(bool, viewReceivedFocus);
+
+#define triggerJavascriptFocus()\
+ evaluateJavaScriptSync(webView->page(), "document.getElementById(\"input\").focus()");
+#define loadAndTriggerFocusAndCompare()\
+ QTRY_COMPARE(loadSpy.count(), 1);\
+ triggerJavascriptFocus();\
+ QTRY_COMPARE(webView->hasFocus(), viewReceivedFocus);
+
+ // Create a container widget, that will hold a line edit that has initial focus, and a web
+ // engine view.
+ QScopedPointer<QWidget> containerWidget(new QWidget);
+ QLineEdit *label = new QLineEdit;
+ label->setText(QString::fromLatin1("Text"));
+ label->setFocus();
+
+ // Create the web view, and set its focusOnNavigation property.
+ QWebEngineView *webView = new QWebEngineView;
+ QWebEngineSettings *settings = webView->page()->settings();
+ settings->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, focusOnNavigation);
+ webView->resize(300, 300);
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(label);
+ layout->addWidget(webView);
+
+ containerWidget->setLayout(layout);
+ containerWidget->show();
+ QTest::qWaitForWindowExposed(containerWidget.data());
+
+ // Load the content, invoke javascript focus on the view, and check which widget has focus.
+ QSignalSpy loadSpy(webView, SIGNAL(loadFinished(bool)));
+ webView->setHtml("<html><head><title>Title</title></head><body>Hello"
+ "<input id=\"input\" type=\"text\"></body></html>");
+ loadAndTriggerFocusAndCompare();
+
+ // Load a different page, and check focus.
+ loadSpy.clear();
+ webView->setHtml("<html><head><title>Title</title></head><body>Hello 2"
+ "<input id=\"input\" type=\"text\"></body></html>");
+ loadAndTriggerFocusAndCompare();
+
+ // Navigate to previous page in history, check focus.
+ loadSpy.clear();
+ webView->triggerPageAction(QWebEnginePage::Back);
+ loadAndTriggerFocusAndCompare();
+
+ // Navigate to next page in history, check focus.
+ loadSpy.clear();
+ webView->triggerPageAction(QWebEnginePage::Forward);
+ loadAndTriggerFocusAndCompare();
+
+ // Reload page, check focus.
+ loadSpy.clear();
+ webView->triggerPageAction(QWebEnginePage::Reload);
+ loadAndTriggerFocusAndCompare();
+
+ // Reload page bypassing cache, check focus.
+ loadSpy.clear();
+ webView->triggerPageAction(QWebEnginePage::ReloadAndBypassCache);
+ loadAndTriggerFocusAndCompare();
+
+ // Manually forcing focus on web view should work.
+ webView->setFocus();
+ QTRY_COMPARE(webView->hasFocus(), true);
+
+ // Clean up.
+#undef loadAndTriggerFocusAndCompare
+#undef triggerJavascriptFocus
+}
+
+void tst_QWebEngineView::changeLocale()
+{
+ QUrl url("http://non.existent/");
+
+ QLocale::setDefault(QLocale("de"));
+ QWebEngineView viewDE;
+ viewDE.setUrl(url);
+
+ QVERIFY(waitForSignal(&viewDE, SIGNAL(titleChanged(QString))));
+ QVERIFY(waitForSignal(&viewDE, SIGNAL(loadFinished(bool))));
+ QCOMPARE(viewDE.title(), QStringLiteral("Nicht verf\u00FCgbar: %1").arg(url.toString()));
+
+ QLocale::setDefault(QLocale("en"));
+ QWebEngineView viewEN;
+ viewEN.setUrl(url);
+
+ QVERIFY(waitForSignal(&viewEN, SIGNAL(titleChanged(QString))));
+ QVERIFY(waitForSignal(&viewEN, SIGNAL(loadFinished(bool))));
+ QCOMPARE(viewEN.title(), QStringLiteral("%1 is not available").arg(url.toString()));
+
+ viewDE.setUrl(QUrl("about:blank"));
+ QVERIFY(waitForSignal(&viewDE, SIGNAL(loadFinished(bool))));
+
+ viewDE.setUrl(url);
+
+ QVERIFY(waitForSignal(&viewDE, SIGNAL(titleChanged(QString))));
+ QVERIFY(waitForSignal(&viewDE, SIGNAL(loadFinished(bool))));
+ QCOMPARE(viewDE.title(), QStringLiteral("Nicht verf\u00FCgbar: %1").arg(url.toString()));
+}
+
+void tst_QWebEngineView::inputMethodsTextFormat_data()
+{
+ QTest::addColumn<QString>("string");
+ QTest::addColumn<int>("start");
+ QTest::addColumn<int>("length");
+ QTest::addColumn<int>("underlineStyle");
+ QTest::addColumn<QColor>("underlineColor");
+ QTest::addColumn<QColor>("backgroundColor");
+
+ QTest::newRow("") << QString("") << 0 << 0 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Q") << QString("Q") << 0 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt") << QString("Qt") << 0 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt") << QString("Qt") << 0 << 2 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt") << QString("Qt") << 1 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << 0 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << 1 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << 2 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << 2 << -1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << -2 << 3 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << -1 << -1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("Qt ") << QString("Qt ") << 0 << 3 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("The Qt") << QString("The Qt") << 0 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("The Qt Company") << QString("The Qt Company") << 0 << 1 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("red") << QColor();
+ QTest::newRow("The Qt Company") << QString("The Qt Company") << 0 << 3 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("green") << QColor();
+ QTest::newRow("The Qt Company") << QString("The Qt Company") << 4 << 2 << static_cast<int>(QTextCharFormat::SingleUnderline) << QColor("green") << QColor("red");
+ QTest::newRow("The Qt Company") << QString("The Qt Company") << 7 << 7 << static_cast<int>(QTextCharFormat::NoUnderline) << QColor("green") << QColor("red");
+ QTest::newRow("The Qt Company") << QString("The Qt Company") << 7 << 7 << static_cast<int>(QTextCharFormat::NoUnderline) << QColor() << QColor("red");
+}
+
+
+void tst_QWebEngineView::inputMethodsTextFormat()
+{
+ QWebEngineView view;
+ QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
+
+ view.setHtml("<html><body>"
+ " <input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>"
+ "</body></html>");
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+
+ evaluateJavaScriptSync(view.page(), "document.getElementById('input1').focus()");
+ view.show();
+
+ QFETCH(QString, string);
+ QFETCH(int, start);
+ QFETCH(int, length);
+ QFETCH(int, underlineStyle);
+ QFETCH(QColor, underlineColor);
+ QFETCH(QColor, backgroundColor);
+
+ QList<QInputMethodEvent::Attribute> attrs;
+ QTextCharFormat format;
+ format.setUnderlineStyle(static_cast<QTextCharFormat::UnderlineStyle>(underlineStyle));
+ format.setUnderlineColor(underlineColor);
+ if (backgroundColor.isValid())
+ format.setBackground(QBrush(backgroundColor));
+ attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format));
+
+ QInputMethodEvent im(string, attrs);
+ QVERIFY(QApplication::sendEvent(view.focusProxy(), &im));
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('input1').value").toString(), string);
+}
+
+void tst_QWebEngineView::keyboardEvents()
+{
+ QWebEngineView view;
+ view.show();
+ QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
+ view.load(QUrl("qrc:///resources/keyboardEvents.html"));
+ QVERIFY(loadFinishedSpy.wait());
+
+ QStringList elements;
+ elements << "first_div" << "second_div";
+ elements << "text_input" << "radio1" << "checkbox1" << "checkbox2";
+ elements << "number_input" << "range_input" << "search_input";
+ elements << "submit_button" << "combobox" << "first_hyperlink" << "second_hyperlink";
+
+ // Iterate over the elements of the test page with the Tab key. This tests whether any
+ // element blocks the in-page navigation by Tab.
+ for (const QString &elementId : elements) {
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString(), elementId);
+ QTest::keyPress(view.focusProxy(), Qt::Key_Tab);
+ }
+
+ // Move back to the radio buttons with the Shift+Tab key combination
+ for (int i = 0; i < 10; ++i)
+ QTest::keyPress(view.focusProxy(), Qt::Key_Tab, Qt::ShiftModifier);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString(), QStringLiteral("radio2"));
+
+ // Test the Space key by checking a radio button
+ QVERIFY(!evaluateJavaScriptSync(view.page(), "document.getElementById('radio2').checked").toBool());
+ QTest::keyClick(view.focusProxy(), Qt::Key_Space);
+ QTRY_VERIFY(evaluateJavaScriptSync(view.page(), "document.getElementById('radio2').checked").toBool());
+
+ // Test the Left key by switching the radio button
+ QVERIFY(!evaluateJavaScriptSync(view.page(), "document.getElementById('radio1').checked").toBool());
+ QTest::keyPress(view.focusProxy(), Qt::Key_Left);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString(), QStringLiteral("radio1"));
+ QVERIFY(!evaluateJavaScriptSync(view.page(), "document.getElementById('radio2').checked").toBool());
+ QVERIFY(evaluateJavaScriptSync(view.page(), "document.getElementById('radio1').checked").toBool());
+
+ // Test the Space key by unchecking a checkbox
+ evaluateJavaScriptSync(view.page(), "document.getElementById('checkbox1').focus()");
+ QVERIFY(evaluateJavaScriptSync(view.page(), "document.getElementById('checkbox1').checked").toBool());
+ QTest::keyClick(view.focusProxy(), Qt::Key_Space);
+ QTRY_VERIFY(!evaluateJavaScriptSync(view.page(), "document.getElementById('checkbox1').checked").toBool());
+
+ // Test the Up and Down keys by changing the value of a spinbox
+ evaluateJavaScriptSync(view.page(), "document.getElementById('number_input').focus()");
+ QCOMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('number_input').value").toInt(), 5);
+ QTest::keyPress(view.focusProxy(), Qt::Key_Up);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('number_input').value").toInt(), 6);
+ QTest::keyPress(view.focusProxy(), Qt::Key_Down);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('number_input').value").toInt(), 5);
+
+ // Test the Left, Right, Home, PageUp, End and PageDown keys by changing the value of a slider
+ evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').focus()");
+ QCOMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("5"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_Left);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("4"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_Right);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("5"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_Home);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("0"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_PageUp);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("1"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_End);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("10"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_PageDown);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('range_input').value").toString(), QStringLiteral("9"));
+
+ // Test the Escape key by removing the content of a search field
+ evaluateJavaScriptSync(view.page(), "document.getElementById('search_input').focus()");
+ QCOMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('search_input').value").toString(), QStringLiteral("test"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_Escape);
+ QTRY_VERIFY(evaluateJavaScriptSync(view.page(), "document.getElementById('search_input').value").toString().isEmpty());
+
+ // Test the alpha keys by changing the values in a combobox
+ evaluateJavaScriptSync(view.page(), "document.getElementById('combobox').focus()");
+ QCOMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('combobox').value").toString(), QStringLiteral("a"));
+ QTest::keyPress(view.focusProxy(), Qt::Key_B);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('combobox').value").toString(), QStringLiteral("b"));
+ // Must wait with the second key press to simulate selection of another element
+ QTest::keyPress(view.focusProxy(), Qt::Key_C, Qt::NoModifier, 1000);
+ QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.getElementById('combobox').value").toString(), QStringLiteral("c"));
+
+ // Test the Enter key by loading a page with a hyperlink
+ evaluateJavaScriptSync(view.page(), "document.getElementById('first_hyperlink').focus()");
+ QTest::keyPress(view.focusProxy(), Qt::Key_Enter);
+ QVERIFY(loadFinishedSpy.wait());
+}
+
QTEST_MAIN(tst_QWebEngineView)
#include "tst_qwebengineview.moc"
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc b/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc
index b32b533c2..4809bbebf 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.qrc
@@ -5,5 +5,6 @@
<file>resources/input_types.html</file>
<file>resources/scrolltest_page.html</file>
<file>resources/basic_printing_page.html</file>
+ <file>resources/keyboardEvents.html</file>
</qresource>
</RCC>
diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
index 2f5416701..c7096b6b6 100644
--- a/tests/auto/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets.pro
@@ -13,7 +13,10 @@ SUBDIRS += \
qwebenginesettings \
qwebengineview
-# QTBUG-53135, osx does not use hunspell
-!contains(WEBENGINE_CONFIG, no_spellcheck):!osx:!cross_compile {
- SUBDIRS += qwebenginespellcheck
+!contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
+ !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+ SUBDIRS += qwebenginespellcheck
+ } else {
+ message("Spellcheck test will not be built because it depends on usage of Hunspell dictionaries.")
+ }
}
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
new file mode 100644
index 000000000..edf95846c
--- /dev/null
+++ b/tests/manual/manual.pro
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ widgets \
+ quick
+
+!qtHaveModule(webenginewidgets): SUBDIRS -= widgets
diff --git a/tests/manual/quick/faviconbrowser/AddressBar.qml b/tests/manual/quick/faviconbrowser/AddressBar.qml
new file mode 100644
index 000000000..7122b2862
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/AddressBar.qml
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+Rectangle {
+ id: root
+
+ property int progress: 0
+ property url iconUrl: ""
+ property url pageUrl: ""
+
+ signal accepted(url addressUrl)
+
+ clip: true
+
+ onActiveFocusChanged: {
+ if (activeFocus)
+ addressField.forceActiveFocus();
+ }
+
+ Rectangle {
+ width: addressField.width / 100 * root.progress
+ height: root.height
+
+ visible: root.progress < 100
+
+ color: "#b6dca6"
+ radius: root.radius
+ }
+
+ TextField {
+ id: addressField
+ anchors.fill: parent
+
+ Image {
+ anchors.verticalCenter: addressField.verticalCenter
+ x: 5; z: parent.z + 1
+ width: 16; height: 16
+ sourceSize: Qt.size(width, height)
+ source: root.iconUrl
+ visible: root.progress == 100
+ }
+
+ Text {
+ text: root.progress < 0 ? "" : root.progress + "%"
+ x: 5; z: parent.z + 1
+ font.bold: true
+ anchors.verticalCenter: parent.verticalCenter
+
+ visible: root.progress < 100
+ }
+
+ style: TextFieldStyle {
+ padding.left: 30
+
+ background: Rectangle {
+ color: "transparent"
+ border.color: "black"
+ border.width: 1
+ radius: root.radius
+ }
+ }
+
+ onActiveFocusChanged: {
+ if (activeFocus)
+ selectAll();
+ else
+ deselect();
+ }
+
+ text: root.pageUrl
+ onAccepted: root.accepted(utils.fromUserInput(text))
+ }
+}
diff --git a/tests/manual/quick/faviconbrowser/FaviconPanel.qml b/tests/manual/quick/faviconbrowser/FaviconPanel.qml
new file mode 100644
index 000000000..ce768b82d
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/FaviconPanel.qml
@@ -0,0 +1,256 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+import QtQuick.Layouts 1.1
+
+Item {
+ id: root
+
+ property url iconUrl: ""
+ property int iconSize: 128
+ property int iconMinimumSize: 8
+ property int iconMaximumSize: 256
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: 2
+
+ Rectangle {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: 2
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.preferredWidth: (parent.width - 2 * parent.spacing) / 3
+
+ border.color: "black"
+ border.width: 1
+ clip: true
+
+ Text {
+ z: parent.z + 1
+ anchors.top: parent.top
+ anchors.topMargin: 5
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ font.bold: true
+
+ text: "faviconImage"
+ }
+
+ Image {
+ id: faviconImage
+ anchors.centerIn: parent
+
+ width: root.iconSize
+ height: width
+ sourceSize: Qt.size(width, height)
+
+ source: root.iconUrl
+
+ onStatusChanged: {
+ if (status == Image.Ready) {
+ grabToImage(function(result) {
+ grabImage.source = result.url;
+ });
+ }
+
+ if (status == Image.Null)
+ grabImage.source = "";
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.preferredWidth: (parent.width - 2 * parent.spacing) / 3
+
+ border.color: "black"
+ border.width: 1
+ clip: true
+
+ Text {
+ z: parent.z + 1
+ anchors.top: parent.top
+ anchors.topMargin: 5
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ font.bold: true
+
+ text: "grabImage"
+ }
+
+ Image {
+ id: grabImage
+ anchors.centerIn: parent
+
+ width: root.iconSize
+ height: width
+
+ onStatusChanged: {
+ if (status == Image.Ready || status == Image.Null)
+ faviconCanvas.requestPaint();
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.preferredWidth: (parent.width - 2 * parent.spacing) / 3
+
+ border.color: "black"
+ border.width: 1
+ clip: true
+
+ Text {
+ z: parent.z + 1
+ anchors.top: parent.top
+ anchors.topMargin: 5
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ font.bold: true
+
+ text: "faviconCanvas"
+ }
+
+ Canvas {
+ id: faviconCanvas
+ anchors.centerIn: parent
+
+ width: root.iconSize
+ height: width
+
+ onPaint: {
+ var ctx = getContext("2d");
+ ctx.reset();
+ ctx.clearRect(0, 0, width, height);
+
+ if (grabImage.source == "")
+ return;
+
+ ctx.drawImage(grabImage, 0, 0, width, height);
+
+ var imageData = ctx.getImageData(width/2, height/2, width/2, height/2);
+ var pixel = imageData.data;
+
+ verbose.append("pixel(" + width/2 + ", " + height/2 + "): " + pixel[0] + ", " + pixel[1] + ", " + pixel[2]);
+ }
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.preferredWidth: 100
+
+ Slider {
+ id: faviconSizeSlider
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.bottom: faviconSizeSpin.top
+
+ orientation: Qt.Vertical
+ minimumValue: root.iconMinimumSize
+ maximumValue: root.iconMaximumSize
+ stepSize: 1
+ tickmarksEnabled: true
+ value: root.iconSize
+
+ onValueChanged: {
+ if (pressed && value != root.iconSize)
+ root.iconSize = value;
+ }
+ }
+
+ SpinBox {
+ id: faviconSizeSpin
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+
+ minimumValue: root.iconMinimumSize
+ maximumValue: root.iconMaximumSize
+ value: root.iconSize
+
+ onEditingFinished: {
+ if (value != root.iconSize)
+ root.iconSize = value;
+ }
+ }
+ }
+
+ TextArea {
+ id: verbose
+
+ Layout.fillHeight: true
+ Layout.preferredWidth: 310
+
+ readOnly: true
+ tabChangesFocus: true
+
+ font.family: "Monospace"
+ font.pointSize: 12
+
+ textFormat: TextEdit.RichText
+ frameVisible: false
+
+ style: TextAreaStyle {
+ backgroundColor: "lightgray"
+ }
+ }
+ }
+}
diff --git a/tests/manual/quick/faviconbrowser/faviconbrowser.pro b/tests/manual/quick/faviconbrowser/faviconbrowser.pro
new file mode 100644
index 000000000..d4368ab3e
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/faviconbrowser.pro
@@ -0,0 +1,23 @@
+QT += qml quick webengine
+qtHaveModule(widgets) {
+ QT += widgets # QApplication is required to get native styling with QtQuickControls
+}
+
+TARGET = faviconbrowser
+TEMPLATE = app
+
+
+SOURCES = \
+ main.cpp
+
+HEADERS = \
+ utils.h
+
+OTHER_FILES += \
+ main.qml \
+ AddressBar.qml \
+ FaviconPanel.qml
+
+RESOURCES += \
+ faviconbrowser.qrc
+
diff --git a/tests/manual/quick/faviconbrowser/faviconbrowser.qrc b/tests/manual/quick/faviconbrowser/faviconbrowser.qrc
new file mode 100644
index 000000000..95d0dc2c4
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/faviconbrowser.qrc
@@ -0,0 +1,17 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/">
+ <file>main.qml</file>
+ <file>AddressBar.qml</file>
+ <file>FaviconPanel.qml</file>
+ </qresource>
+ <qresource prefix="test">
+ <file alias="favicon-multi-gray.html">../../../auto/quick/qmltests/data/favicon-multi-gray.html</file>
+ <file alias="favicon-candidates-gray.html">../../../auto/quick/qmltests/data/favicon-candidates-gray.html</file>
+ <file alias="icons/grayicons.ico">../../../auto/quick/qmltests/data/icons/grayicons.ico</file>
+ <file alias="icons/gray16.png">../../../auto/quick/qmltests/data/icons/gray16.png</file>
+ <file alias="icons/gray32.png">../../../auto/quick/qmltests/data/icons/gray32.png</file>
+ <file alias="icons/gray64.png">../../../auto/quick/qmltests/data/icons/gray64.png</file>
+ <file alias="icons/gray128.png">../../../auto/quick/qmltests/data/icons/gray128.png</file>
+ <file alias="icons/gray255.png">../../../auto/quick/qmltests/data/icons/gray255.png</file>
+ </qresource>
+</RCC>
diff --git a/tests/manual/quick/faviconbrowser/main.cpp b/tests/manual/quick/faviconbrowser/main.cpp
new file mode 100644
index 000000000..b75be2483
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/main.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "utils.h"
+
+#ifndef QT_NO_WIDGETS
+#include <QtWidgets/QApplication>
+typedef QApplication Application;
+#else
+#include <QtGui/QGuiApplication>
+typedef QGuiApplication Application;
+#endif
+#include <QtQml/QQmlApplicationEngine>
+#include <QtQml/QQmlContext>
+#include <QtWebEngine/qtwebengineglobal.h>
+
+int main(int argc, char **argv)
+{
+ Application app(argc, argv);
+
+ QtWebEngine::initialize();
+
+ QQmlApplicationEngine appEngine;
+ Utils utils;
+ appEngine.rootContext()->setContextProperty("utils", &utils);
+ appEngine.load(QUrl("qrc:/main.qml"));
+
+ return app.exec();
+}
diff --git a/tests/manual/quick/faviconbrowser/main.qml b/tests/manual/quick/faviconbrowser/main.qml
new file mode 100644
index 000000000..1ad5fc2e8
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/main.qml
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 1.4
+import QtQuick.Layouts 1.1
+import QtWebEngine 1.3
+import Qt.labs.settings 1.0
+
+ApplicationWindow {
+ width: 1300
+ height: 900
+ visible: true
+
+ Item {
+ id: bookmarkUrls
+
+ property url multiTest: Qt.resolvedUrl("qrc:/test/favicon-multi-gray.html")
+ property url candidatesTest: Qt.resolvedUrl("qrc:/test/favicon-candidates-gray.html")
+ property url aboutBlank: Qt.resolvedUrl("about:blank")
+ property url qtHome: Qt.resolvedUrl("http://www.qt.io/")
+ }
+
+ Settings {
+ id: appSettings
+
+ property alias autoLoadIconsForPage: autoLoadIconsForPage.checked
+ property alias touchIconsEnabled: touchIconsEnabled.checked
+ }
+
+ SplitView {
+ anchors.fill: parent
+ orientation: Qt.Vertical
+
+ FaviconPanel {
+ id: faviconPanel
+
+ Layout.fillWidth: true
+ Layout.minimumHeight: 200
+
+ Layout.margins: 2
+
+ iconUrl: webEngineView && webEngineView.icon
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Layout.topMargin: 2
+
+ AddressBar {
+ id: addressBar
+
+ Layout.fillWidth: true
+ Layout.leftMargin: 5
+ Layout.rightMargin: 5
+ height: 25
+
+ color: "white"
+ radius: 4
+
+ progress: webEngineView && webEngineView.loadProgress
+ iconUrl: webEngineView && webEngineView.icon
+ pageUrl: webEngineView && webEngineView.url
+
+ onAccepted: webEngineView.url = addressUrl
+ }
+
+ Rectangle {
+ id: toolBar
+
+ Layout.fillWidth: true
+ Layout.leftMargin: 5
+ Layout.rightMargin: 5
+ Layout.preferredHeight: 25
+
+ RowLayout {
+ anchors.verticalCenter: parent.verticalCenter
+
+ Button {
+ text: "Multi-sized Favicon Test"
+ onClicked: webEngineView.url = bookmarkUrls.multiTest
+ enabled: webEngineView.url != bookmarkUrls.multiTest
+ }
+
+ Button {
+ text: "Candidate Favicons Test"
+ onClicked: webEngineView.url = bookmarkUrls.candidatesTest
+ enabled: webEngineView.url != bookmarkUrls.candidatesTest
+ }
+
+ Button {
+ text: "About Blank"
+ onClicked: webEngineView.url = bookmarkUrls.aboutBlank
+ enabled: webEngineView.url != bookmarkUrls.aboutBlank
+ }
+
+ Button {
+ text: "Qt Home Page"
+ onClicked: webEngineView.url = bookmarkUrls.qtHome
+ enabled: webEngineView.url != bookmarkUrls.qtHome
+ }
+ }
+
+ ToolButton {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+
+ menu: Menu {
+ MenuItem {
+ id: autoLoadIconsForPage
+ text: "Icons On"
+ checkable: true
+ checked: WebEngine.settings.autoLoadIconsForPage
+
+ onCheckedChanged: webEngineView.reload()
+ }
+
+ MenuItem {
+ id: touchIconsEnabled
+ text: "Touch Icons On"
+ checkable: true
+ checked: WebEngine.settings.touchIconsEnabled
+ enabled: autoLoadIconsForPage.checked
+
+ onCheckedChanged: webEngineView.reload()
+ }
+ }
+ }
+ }
+
+ WebEngineView {
+ id: webEngineView
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ settings.autoLoadIconsForPage: appSettings.autoLoadIconsForPage
+ settings.touchIconsEnabled: appSettings.touchIconsEnabled
+
+ Component.onCompleted: webEngineView.url = bookmarkUrls.multiTest
+ }
+ }
+ }
+}
diff --git a/tests/manual/quick/faviconbrowser/utils.h b/tests/manual/quick/faviconbrowser/utils.h
new file mode 100644
index 000000000..79aa38cc7
--- /dev/null
+++ b/tests/manual/quick/faviconbrowser/utils.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef UTILS_H
+#define UTILS_H
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QUrl>
+
+class Utils : public QObject {
+ Q_OBJECT
+public:
+ Q_INVOKABLE static QUrl fromUserInput(const QString& userInput);
+};
+
+inline QUrl Utils::fromUserInput(const QString& userInput)
+{
+ QFileInfo fileInfo(userInput);
+ if (fileInfo.exists())
+ return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
+ return QUrl::fromUserInput(userInput);
+}
+
+#endif // UTILS_H
diff --git a/tests/manual/quick/quick.pro b/tests/manual/quick/quick.pro
new file mode 100644
index 000000000..5251c4b42
--- /dev/null
+++ b/tests/manual/quick/quick.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ faviconbrowser
diff --git a/tests/manual/widgets/inputmethods/colorpicker.cpp b/tests/manual/widgets/inputmethods/colorpicker.cpp
new file mode 100644
index 000000000..f279eb418
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/colorpicker.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "colorpicker.h"
+
+#include <QColorDialog>
+#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QPushButton>
+
+ColorPicker::ColorPicker(QWidget *parent)
+ : QWidget(parent)
+ , m_colorInput(new QLineEdit)
+ , m_chooseButton(new QPushButton)
+{
+ m_chooseButton->setText(tr("Choose"));
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->setMargin(0);
+ layout->addWidget(m_colorInput);
+ layout->addWidget(m_chooseButton);
+ setLayout(layout);
+
+ connect(m_colorInput, &QLineEdit::textChanged, this, &ColorPicker::colorStringChanged);
+ connect(m_chooseButton, &QPushButton::clicked, this, &ColorPicker::selectButtonClicked);
+}
+
+QColor ColorPicker::color() const
+{
+ return QColor(m_colorInput->text());
+}
+
+void ColorPicker::setColor(const QColor &color)
+{
+ if (color.isValid())
+ m_colorInput->setText(color.name(QColor::HexArgb));
+}
+
+void ColorPicker::colorStringChanged(const QString &colorString)
+{
+ QColor color(colorString);
+ QPalette palette;
+
+ palette.setColor(QPalette::Base, color.isValid() ? color : QColor(Qt::white));
+ m_colorInput->setPalette(palette);
+}
+
+void ColorPicker::selectButtonClicked()
+{
+ QColor selectedColor = QColorDialog::getColor(color().isValid() ? color() : Qt::white,
+ this,
+ "Select Color",
+ QColorDialog::ShowAlphaChannel);
+ setColor(selectedColor);
+}
diff --git a/tests/manual/widgets/inputmethods/colorpicker.h b/tests/manual/widgets/inputmethods/colorpicker.h
new file mode 100644
index 000000000..f5448ad2d
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/colorpicker.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLORPICKER_H
+#define COLORPICKER_H
+
+#include <QColor>
+#include <QWidget>
+
+class QLineEdit;
+class QPushButton;
+
+class ColorPicker : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit ColorPicker(QWidget *parent = 0);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+public slots:
+ void colorStringChanged(const QString &);
+ void selectButtonClicked();
+
+private:
+ QLineEdit *m_colorInput;
+ QPushButton *m_chooseButton;
+};
+
+#endif // COLORPICKER_H
diff --git a/tests/manual/widgets/inputmethods/controlview.cpp b/tests/manual/widgets/inputmethods/controlview.cpp
new file mode 100644
index 000000000..4538ced4b
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/controlview.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "controlview.h"
+
+#include <QComboBox>
+#include <QCoreApplication>
+#include <QFormLayout>
+#include <QInputMethodEvent>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QSpinBox>
+#include <QTextCharFormat>
+#include <QTextCursor>
+
+#include "colorpicker.h"
+
+ControlView::ControlView(QWidget *parent)
+ : QWidget(parent)
+ , m_underlineStyleCombo(new QComboBox)
+ , m_underlineColorPicker(new ColorPicker)
+ , m_backgroundColorPicker(new ColorPicker)
+ , m_startSpin(new QSpinBox)
+ , m_lengthSpin(new QSpinBox)
+ , m_inputLine(new QLineEdit)
+ , m_sendEventButton(new QPushButton)
+{
+ m_underlineStyleCombo->addItem(tr("No Underline"), QVariant(QTextCharFormat::NoUnderline));
+ m_underlineStyleCombo->addItem(tr("Single Underline"), QVariant(QTextCharFormat::SingleUnderline));
+
+ m_startSpin->setMinimum(-99);
+ m_lengthSpin->setMinimum(-99);
+
+ m_sendEventButton->setText(tr("Send Input Method Event"));
+
+ QFormLayout *layout = new QFormLayout;
+ layout->addRow(tr("Underline Style:"), m_underlineStyleCombo);
+ layout->addRow(tr("Underline Color:"), m_underlineColorPicker);
+ layout->addRow(tr("Background Color:"), m_backgroundColorPicker);
+ layout->addRow(tr("Start:"), m_startSpin);
+ layout->addRow(tr("Length:"), m_lengthSpin);
+ layout->addRow(tr("Input:"), m_inputLine);
+ layout->addRow(m_sendEventButton);
+ setLayout(layout);
+
+ connect(m_sendEventButton, &QPushButton::clicked, this, &ControlView::createAndSendInputMethodEvent);
+}
+
+void ControlView::receiveInputMethodData(int start,
+ int length,
+ QTextCharFormat::UnderlineStyle underlineStyle,
+ const QColor &underlineColor,
+ const QColor &backgroundColor,
+ const QString &input)
+{
+ m_startSpin->setValue(start);
+ m_lengthSpin->setValue(length);
+ m_underlineStyleCombo->setCurrentIndex(m_underlineStyleCombo->findData(underlineStyle));
+ m_underlineColorPicker->setColor(underlineColor);
+ m_backgroundColorPicker->setColor(backgroundColor);
+ m_inputLine->setText(input);
+}
+
+void ControlView::createAndSendInputMethodEvent()
+{
+ int start = m_startSpin->value();
+ int length = m_lengthSpin->value();
+
+ QTextCharFormat format;
+ format.setUnderlineStyle(static_cast<QTextCharFormat::UnderlineStyle>(m_underlineStyleCombo->currentData().toInt()));
+ format.setUnderlineColor(m_underlineColorPicker->color());
+
+ const QColor &backgroundColor = m_backgroundColorPicker->color();
+ if (backgroundColor.isValid())
+ format.setBackground(QBrush(backgroundColor));
+
+ QList<QInputMethodEvent::Attribute> attrs;
+ attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format));
+ QInputMethodEvent im(m_inputLine->text(), attrs);
+
+ emit sendInputMethodEvent(im);
+}
diff --git a/tests/manual/widgets/inputmethods/controlview.h b/tests/manual/widgets/inputmethods/controlview.h
new file mode 100644
index 000000000..0ef10f6a8
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/controlview.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTROLVIEW_H
+#define CONTROLVIEW_H
+
+#include <QInputMethodEvent>
+#include <QTextCharFormat>
+#include <QWidget>
+
+class ColorPicker;
+class QComboBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QSpinBox;
+
+class ControlView : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit ControlView(QWidget *parent = 0);
+
+public slots:
+ void receiveInputMethodData(int, int, QTextCharFormat::UnderlineStyle, const QColor &, const QColor &, const QString &);
+ void createAndSendInputMethodEvent();
+
+signals:
+ void sendInputMethodEvent(QInputMethodEvent);
+
+private:
+ QComboBox *m_underlineStyleCombo;
+ ColorPicker *m_underlineColorPicker;
+ ColorPicker *m_backgroundColorPicker;
+ QSpinBox *m_startSpin;
+ QSpinBox *m_lengthSpin;
+ QLineEdit *m_inputLine;
+ QPushButton *m_sendEventButton;
+};
+
+#endif // CONTROLVIEW_H
diff --git a/tests/manual/widgets/inputmethods/inputmethods.pro b/tests/manual/widgets/inputmethods/inputmethods.pro
new file mode 100644
index 000000000..72e8e12f9
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/inputmethods.pro
@@ -0,0 +1,26 @@
+QT += core gui widgets webenginewidgets testlib
+
+TARGET = inputmethods
+TEMPLATE = app
+
+
+SOURCES += \
+ colorpicker.cpp \
+ controlview.cpp \
+ main.cpp \
+ referenceview.cpp \
+ testview.cpp \
+ webview.cpp
+
+HEADERS += \
+ colorpicker.h \
+ controlview.h \
+ referenceview.h \
+ testview.h \
+ webview.h
+
+RESOURCES += \
+ test.qrc
+
+DISTFILES += \
+ testdata.csv
diff --git a/tests/manual/widgets/inputmethods/main.cpp b/tests/manual/widgets/inputmethods/main.cpp
new file mode 100644
index 000000000..a96deb83a
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/main.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QFormLayout>
+#include <QGroupBox>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QMainWindow>
+#include <QVBoxLayout>
+
+#include "controlview.h"
+#include "referenceview.h"
+#include "testview.h"
+#include "webview.h"
+
+// Test for input method events for QWebEngineView. This makes possible to
+// manually customize QInputMethodEvent and validate that it is rendered
+// properly in a web view.
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ explicit MainWindow(QWidget *parent = 0);
+
+private:
+ ControlView *m_controlView;
+ ReferenceView *m_referenceView;
+ WebView *m_webView;
+ TestView *m_testView;
+
+ QLabel *m_referenceProcessed;
+ QLabel *m_webProcessed;
+};
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+ , m_controlView(new ControlView)
+ , m_referenceView(new ReferenceView)
+ , m_webView(new WebView)
+ , m_testView(new TestView)
+ , m_referenceProcessed(new QLabel)
+ , m_webProcessed(new QLabel)
+{
+ m_controlView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_controlView->setFixedWidth(300);
+
+ m_webView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_webView->setFixedWidth(280);
+ m_webView->setFixedHeight(150);
+
+ m_testView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_testView->setMinimumWidth(400);
+
+ QWidget *centralWidget = new QWidget;
+
+ QGroupBox *referenceGroup = new QGroupBox(tr("Reference"));
+ referenceGroup->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ referenceGroup->setMinimumWidth(300);
+ QFormLayout *referenceProcessedForm = new QFormLayout;
+ referenceProcessedForm->addRow(tr("Processed:"), m_referenceProcessed);
+ QVBoxLayout *referenceLayout = new QVBoxLayout;
+ referenceLayout->addWidget(m_referenceView);
+ referenceLayout->addLayout(referenceProcessedForm);
+ referenceGroup->setLayout(referenceLayout);
+
+ QGroupBox *webGroup = new QGroupBox(tr("Web"));
+ webGroup->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ webGroup->setMinimumWidth(300);
+ QFormLayout *webProcessedForm = new QFormLayout;
+ webProcessedForm->addRow(tr("Processed:"), m_webProcessed);
+ QVBoxLayout *webLayout = new QVBoxLayout;
+ webLayout->addWidget(m_webView);
+ webLayout->addLayout(webProcessedForm);
+ webGroup->setLayout(webLayout);
+
+ QVBoxLayout *leftLayout = new QVBoxLayout;
+ leftLayout->addWidget(m_controlView);
+ leftLayout->addWidget(referenceGroup);
+ leftLayout->addWidget(webGroup);
+
+ QHBoxLayout *centralLayout = new QHBoxLayout;
+ centralLayout->addLayout(leftLayout);
+ centralLayout->addWidget(m_testView);
+
+ connect(m_testView, &TestView::sendInputMethodData, m_controlView, &ControlView::receiveInputMethodData);
+ connect(m_testView, &TestView::requestInputMethodEvent, m_controlView, &ControlView::createAndSendInputMethodEvent);
+
+ connect(m_controlView, &ControlView::sendInputMethodEvent, [=](QInputMethodEvent im) {
+ bool processed;
+ QString resultText;
+
+ processed = QApplication::sendEvent(m_referenceView->referenceInput(), &im);
+ resultText = processed ? QStringLiteral("<font color='green'>TRUE</font>")
+ : QStringLiteral("<font color='red'>FALSE</font>");
+ m_referenceProcessed->setText(resultText);
+
+ processed = QApplication::sendEvent(m_webView->focusProxy(), &im);
+ resultText = processed ? QStringLiteral("<font color='green'>TRUE</font>")
+ : QStringLiteral("<font color='red'>FALSE</font>");
+ m_webProcessed->setText(resultText);
+ });
+
+ centralWidget->setLayout(centralLayout);
+ setCentralWidget(centralWidget);
+ setWindowTitle(tr("Input Methods Format Manual Test"));
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
+
+#include "main.moc"
diff --git a/tests/manual/widgets/inputmethods/referenceview.cpp b/tests/manual/widgets/inputmethods/referenceview.cpp
new file mode 100644
index 000000000..906a3001e
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/referenceview.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "referenceview.h"
+
+#include <QVBoxLayout>
+
+ReferenceView::ReferenceView(QWidget *parent)
+ : QWidget(parent)
+ , m_referenceInput(new QLineEdit)
+{
+ m_referenceInput->setMinimumHeight(50);
+ m_referenceInput->setMaximumWidth(250);
+ m_referenceInput->setFont(QFont(QStringLiteral("Serif"), 28));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(m_referenceInput);
+ setLayout(layout);
+}
+
+QLineEdit *ReferenceView::referenceInput()
+{
+ return m_referenceInput;
+}
diff --git a/tests/quicktestbrowser/ContextMenuExtras.qml b/tests/manual/widgets/inputmethods/referenceview.h
index c90c65495..4025d4886 100644
--- a/tests/quicktestbrowser/ContextMenuExtras.qml
+++ b/tests/manual/widgets/inputmethods/referenceview.h
@@ -26,24 +26,21 @@
**
****************************************************************************/
-import QtQuick 2.1
-import QtWebEngine.UIDelegates 1.0
+#ifndef REFERENCEVIEW_H
+#define REFERENCEVIEW_H
-VisualItemModel {
- MenuItem {
- text: "An application specific entry"
- onTriggered: console.log("Application specific action triggered")
- }
- Menu {
- title: "Extras Submenu"
- MenuItem {
- text: "something"
- onTriggered: console.log("something triggered")
- }
- MenuItem {
- text: "something else"
- enabled: false
- }
- }
-}
+#include <QLineEdit>
+#include <QWidget>
+class ReferenceView : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit ReferenceView(QWidget *parent = 0);
+ QLineEdit *referenceInput();
+
+private:
+ QLineEdit *m_referenceInput;
+};
+
+#endif // REFERENCEVIEW_H
diff --git a/tests/manual/widgets/inputmethods/test.qrc b/tests/manual/widgets/inputmethods/test.qrc
new file mode 100644
index 000000000..bee4bec74
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/test.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>testdata.csv</file>
+ </qresource>
+</RCC>
diff --git a/tests/manual/widgets/inputmethods/testdata.csv b/tests/manual/widgets/inputmethods/testdata.csv
new file mode 100644
index 000000000..4d57e19e8
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/testdata.csv
@@ -0,0 +1,21 @@
+"", 0, 0, 1, "red", ""
+
+"Q", 0, 1, 1, "red", ""
+"Qt", 0, 1, 1, "red", ""
+"Qt", 0, 2, 1, "red", ""
+"Qt", 1, 1, 1, "red", ""
+
+"Qt ", 0, 1, 1, "red", ""
+"Qt ", 1, 1, 1, "red", ""
+"Qt ", 2, 1, 1, "red", ""
+"Qt ", 2, -1, 1, "red", ""
+"Qt ", -2, 3, 1, "red", ""
+"Qt ", -1, -1, 1, "red", ""
+
+"The Qt", 0, 1, 1, "red", ""
+"The Qt Company", 0, 1, 1, "red", ""
+
+"The Qt Company", 0, 3, 1, "green", ""
+"The Qt Company", 4, 2, 1, "green", "red"
+"The Qt Company", 7, 7, 0, "green", "red"
+"The Qt Company", 7, 7, 0, "", "red"
diff --git a/tests/manual/widgets/inputmethods/testview.cpp b/tests/manual/widgets/inputmethods/testview.cpp
new file mode 100644
index 000000000..d41734c2d
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/testview.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "testview.h"
+
+#include <QDebug>
+#include <QFile>
+#include <QPushButton>
+#include <QRegExp>
+#include <QStandardItemModel>
+#include <QTableView>
+#include <QTest>
+#include <QTextCharFormat>
+#include <QVBoxLayout>
+
+TestView::TestView(QWidget *parent)
+ : QWidget(parent)
+ , m_tableView(new QTableView)
+ , m_testButton(new QPushButton)
+ , m_testRunning(false)
+{
+ m_testButton->setText(tr("Start Test"));
+ connect(m_testButton, &QPushButton::clicked, this, &TestView::startOrCancelTest);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(m_tableView);
+ layout->addWidget(m_testButton);
+ setLayout(layout);
+
+ QStandardItemModel *model = new QStandardItemModel(0, 6, this);
+ model->setHorizontalHeaderItem(0, new QStandardItem(tr("Input")));
+ model->setHorizontalHeaderItem(1, new QStandardItem(tr("Start")));
+ model->setHorizontalHeaderItem(2, new QStandardItem(tr("Length")));
+ model->setHorizontalHeaderItem(3, new QStandardItem(tr("Underline")));
+ model->setHorizontalHeaderItem(4, new QStandardItem(tr("Underline Color")));
+ model->setHorizontalHeaderItem(5, new QStandardItem(tr("Background Color")));
+
+ m_tableView->setModel(model);
+ connect(m_tableView, &QTableView::clicked, this, &TestView::collectAndSendData);
+
+ loadTestData(":/testdata.csv");
+}
+
+void TestView::loadTestData(const QString &testDataPath)
+{
+ QFile testDataFile(testDataPath);
+ if (!testDataFile.open(QIODevice::ReadOnly)) {
+ qWarning() << "Unable to open " << testDataFile.fileName() << ":" << testDataFile.errorString();
+ return;
+ }
+
+ QTextStream testDataStream(&testDataFile);
+ while (!testDataStream.atEnd()) {
+ QString line = testDataStream.readLine();
+ QRegExp data("^\"(.*)\"\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(\\d+)\\s*,\\s*\"(.*)\"\\s*,\\s*\"(.*)\"\\s*$");
+ if (!data.exactMatch(line))
+ continue;
+
+ QStandardItemModel *model = qobject_cast<QStandardItemModel *>(m_tableView->model());
+
+ QList<QStandardItem *> row;
+ for (int i = 1; i <= data.captureCount(); ++i)
+ row.append(new QStandardItem(data.cap(i)));
+
+ model->appendRow(row);
+ }
+
+ testDataFile.close();
+}
+
+void TestView::startOrCancelTest()
+{
+ if (m_testRunning) {
+ m_testRunning = false;
+ m_testButton->setText(tr("Start Test"));
+ return;
+ }
+
+ m_testRunning = true;
+ m_testButton->setText(tr("Cancel Test"));
+
+ int firstRowIndex = m_tableView->currentIndex().row() + 1;
+ if (firstRowIndex == m_tableView->model()->rowCount())
+ firstRowIndex = 0;
+
+ for (int row = firstRowIndex; row < m_tableView->model()->rowCount(); ++row) {
+ if (!m_testRunning)
+ break;
+
+ m_tableView->selectRow(row);
+ collectAndSendData();
+ emit requestInputMethodEvent();
+
+ QTest::qWait(1000);
+ }
+
+ if (m_testRunning) {
+ m_testRunning = false;
+ m_testButton->setText(tr("Start Test"));
+ }
+}
+
+void TestView::collectAndSendData()
+{
+ int row = m_tableView->currentIndex().row();
+ QStandardItemModel *model = static_cast<QStandardItemModel *>(m_tableView->model());
+
+ const QString &input = model->data(model->index(row, 0)).toString();
+ const int start = model->data(model->index(row, 1)).toInt();
+ const int length = model->data(model->index(row, 2)).toInt();
+ const QTextCharFormat::UnderlineStyle underlineStyle = static_cast<QTextCharFormat::UnderlineStyle>(model->data(model->index(row, 3)).toInt());
+ const QColor &underlineColor = qvariant_cast<QColor>(model->data(model->index(row, 4)));
+ const QColor &backgroundColor = qvariant_cast<QColor>(model->data(model->index(row, 5)));
+
+ emit sendInputMethodData(start, length, underlineStyle, underlineColor, backgroundColor.isValid() ? backgroundColor : Qt::white, input);
+}
diff --git a/tests/manual/widgets/inputmethods/testview.h b/tests/manual/widgets/inputmethods/testview.h
new file mode 100644
index 000000000..4934a5f87
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/testview.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TESTVIEW_H
+#define TESTVIEW_H
+
+#include <QTextCharFormat>
+#include <QWidget>
+
+class QPushButton;
+class QTableView;
+
+class TestView : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit TestView(QWidget *parent = 0);
+
+public slots:
+ void loadTestData(const QString &);
+ void startOrCancelTest();
+ void collectAndSendData();
+
+signals:
+ void sendInputMethodData(int, int, QTextCharFormat::UnderlineStyle, const QColor &, const QColor &, const QString &);
+ void requestInputMethodEvent();
+
+private:
+ QTableView *m_tableView;
+ QPushButton *m_testButton;
+
+ bool m_testRunning;
+};
+
+#endif // TESTVIEW_H
diff --git a/tests/manual/widgets/inputmethods/webview.cpp b/tests/manual/widgets/inputmethods/webview.cpp
new file mode 100644
index 000000000..ac5dadce1
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/webview.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "webview.h"
+
+WebView::WebView(QWidget *parent)
+ : QWebEngineView(parent)
+{
+ const QString html = QStringLiteral(
+ "<html><head>"
+ " <style>"
+ " input {"
+ " width: 250px; height: 50px; font-size: 28pt;"
+ " position: absolute; top: 50%; left: 50%; margin-left: -125px; margin-top: -25px;"
+ " font-family: serif"
+ " }"
+ " body { background-color: black; }"
+ " </style>"
+ "</head>"
+ "<body onload='document.getElementById(\"input1\").focus();'>"
+ " <input type='text' id='input1' />"
+ "</body></html>");
+
+ setHtml(html);
+}
diff --git a/tests/manual/widgets/inputmethods/webview.h b/tests/manual/widgets/inputmethods/webview.h
new file mode 100644
index 000000000..be57fbf29
--- /dev/null
+++ b/tests/manual/widgets/inputmethods/webview.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef WEBVIEW_H
+#define WEBVIEW_H
+
+#include <QWebEngineView>
+
+class WebView : public QWebEngineView
+{
+ Q_OBJECT
+public:
+ explicit WebView(QWidget *parent = 0);
+};
+
+#endif // WEBVIEW_H
diff --git a/tests/manual/widgets/widgets.pro b/tests/manual/widgets/widgets.pro
new file mode 100644
index 000000000..f06d3e1c3
--- /dev/null
+++ b/tests/manual/widgets/widgets.pro
@@ -0,0 +1,4 @@
+TEMPLATE= subdirs
+
+SUBDIRS += \
+ inputmethods
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 4275fd503..2d8807e8c 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -28,7 +28,6 @@
import QtQuick 2.1
import QtWebEngine 1.2
-import QtWebEngine.experimental 1.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
@@ -393,10 +392,6 @@ ApplicationWindow {
permBar.requestedFeature = feature;
permBar.visible = true;
}
-
- experimental {
- extraContextMenuEntriesComponent: ContextMenuExtras {}
- }
}
Rectangle {
diff --git a/tests/quicktestbrowser/DownloadView.qml b/tests/quicktestbrowser/DownloadView.qml
index 90d161ce3..eb945eccc 100644
--- a/tests/quicktestbrowser/DownloadView.qml
+++ b/tests/quicktestbrowser/DownloadView.qml
@@ -30,7 +30,6 @@ import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtWebEngine 1.0
-import QtWebEngine.experimental 1.0
import QtQuick.Layouts 1.0
Rectangle {
diff --git a/tests/quicktestbrowser/quicktestbrowser.pro b/tests/quicktestbrowser/quicktestbrowser.pro
index 996e82a63..b4fb9a58d 100644
--- a/tests/quicktestbrowser/quicktestbrowser.pro
+++ b/tests/quicktestbrowser/quicktestbrowser.pro
@@ -1,4 +1,4 @@
-requires(contains(QT_CONFIG, accessibility))
+requires(qtConfig(accessibility))
TEMPLATE = app
TARGET = quicktestbrowser
diff --git a/tests/quicktestbrowser/resources.qrc b/tests/quicktestbrowser/resources.qrc
index 2dcda4d0d..b1652852b 100644
--- a/tests/quicktestbrowser/resources.qrc
+++ b/tests/quicktestbrowser/resources.qrc
@@ -3,7 +3,6 @@
<file>ApplicationRoot.qml</file>
<file>BrowserDialog.qml</file>
<file>BrowserWindow.qml</file>
- <file>ContextMenuExtras.qml</file>
<file>FeaturePermissionBar.qml</file>
<file>FullScreenNotification.qml</file>
<file>ButtonWithMenu.qml</file>
diff --git a/tools/about_credits_entry.tmpl b/tools/about_credits_entry.tmpl
index dd74c880a..20bbb28a0 100644
--- a/tools/about_credits_entry.tmpl
+++ b/tools/about_credits_entry.tmpl
@@ -1,6 +1,6 @@
/*!
\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-{{name-sanitized}}.html
+\page qtwebengine-3rdparty-{{name-sanitized}}.html attribution
\ingroup qtwebengine-licensing
\brief {{license-type}}
\title {{name}}
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 6a67bf097..c6f07e39d 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -21,49 +21,69 @@ defineTest(runConfigure) {
}
linux {
+ QT_FOR_CONFIG += gui-private
!config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)")
REQUIRED_PACKAGES = dbus-1 fontconfig
- !cross_compile: contains(QT_CONFIG, xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst
+ !cross_compile: qtConfig(xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst
contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse
- contains(QT_CONFIG, system-png): REQUIRED_PACKAGES += libpng
- contains(QT_CONFIG, system-harfbuzz): REQUIRED_PACKAGES += harfbuzz
+ qtConfig(system-png): REQUIRED_PACKAGES += libpng
+ qtConfig(system-harfbuzz) {
+ packagesExist("\'harfbuzz >= 1.2.0\'"): WEBENGINE_CONFIG += use_system_harfbuzz
+ else: log("System harfbuzz is too old (min. version 1.2). Using Chromium's copy.$${EOL}")
+ }
!cross_compile: REQUIRED_PACKAGES += libpci
for(package, $$list($$REQUIRED_PACKAGES)) {
!packagesExist($$package):skipBuild("Unmet dependency: $$package")
}
- packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip
+ packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip use_system_zlib
else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}")
- packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp
+ packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux
else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
- packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt
+ packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2
else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}")
for(package, $$list("libevent jsoncpp opus protobuf")) {
packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package
- else: log("System $$package not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System $$package not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_$$package
+ }
}
use?(system_protobuf) {
!system("which protoc > /dev/null") {
log("Protobuf compiler not found. Using Chromium's copy of protobuf.$${EOL}")
WEBENGINE_CONFIG -= use_system_protobuf
+ WEBENGINE_CONFIG += use_bundled_protobuf
}
}
config_libvpx: WEBENGINE_CONFIG += use_system_vpx
- else: log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_libvpx
+ }
config_srtp: WEBENGINE_CONFIG += use_system_libsrtp
- else: log("System libsrtp not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System libsrtp not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_srtp
+ }
config_snappy: WEBENGINE_CONFIG += use_system_snappy
- else: log("System snappy not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System snappy not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_snappy
+ }
!cross_compile {
packagesExist(nss): WEBENGINE_CONFIG += use_nss
else: log("System NSS not found, BoringSSL will be used.$${EOL}")
}
}
-
- # Spellcheck support is moved to dev
- WEBENGINE_CONFIG += no_spellcheck
+ isQtMinimum(5, 8) {
+ include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+ QT_FOR_CONFIG += webengine-private
+ qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs
+ qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker
+ }
isEmpty(skipBuildReason): {
cache(CONFIG, add, $$list(webengine_successfully_configured))
@@ -73,61 +93,79 @@ defineTest(runConfigure) {
}
}
-}
-
-# This is called from default_post, at which point we've also parsed
-# command line options
-defineTest(finalizeConfigure) {
- linux {
- use?(nss) {
- log("Certificate handling.............. Using system NSS$${EOL}")
- } else {
- log("Certificate handling.............. Using bundled BoringSSL$${EOL}")
- }
+ unix:!darwin {
+ log("System library dependencies:$${EOL}")
use?(system_icu) {
packagesExist("icu-uc icu-i18n") {
- log("ICU............................... Using system version$${EOL}")
+ log(" ICU ................................ Using system version$${EOL}")
} else {
- log("ICU............................... System ICU not found$${EOL}")
+ log(" ICU ................................ System ICU not found$${EOL}")
skipBuild("Unmet dependencies: icu-uc, icu-i18n")
}
} else {
- log("ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}")
+ log(" ICU ................................ Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_icu
}
use?(system_ffmpeg) {
packagesExist("libavcodec libavformat libavutil") {
packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){
- log("FFMPEG............................ Using system version$${EOL}")
+ log(" FFMPEG ............................. Using system version$${EOL}")
} else {
- log("FFMPEG............................ Conflicting FFMPEG dependencies$${EOL}")
+ log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}")
skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux")
}
} else {
- log("FFMPEG............................ System FFMPEG not found$${EOL}")
+ log(" FFMPEG ............................. System FFMPEG not found$${EOL}")
skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil")
}
} else {
- log("FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
+ log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_ffmpeg
+ }
+ for(config, WEBENGINE_CONFIG) {
+ match = $$find(config, "^use_system_")
+ !isEmpty(match) {
+ use_system += $$replace(match, ^use_system_,)
+ }
+ match = $$find(config, "^use_bundled_")
+ !isEmpty(match) {
+ use_bundled += $$replace(match, ^use_bundled_,)
+ }
}
+ !isEmpty(use_system): log(" Optional system libraries used ..... $$use_system$${EOL}")
+ !isEmpty(use_bundled): log(" Optional bundled libraries used .... $$use_bundled$${EOL}")
}
+ log("Configurable features:$${EOL}")
use?(proprietary_codecs) {
- log("Proprietary codecs (H264, MP3).... Enabled$${EOL}")
+ log(" Proprietary codecs (H264, MP3) ..... Enabled$${EOL}")
} else {
- log("Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}")
+ log(" Proprietary codecs (H264, MP3) ..... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}")
}
qtHaveModule(positioning): {
- log("Geolocation....................... Enabled$${EOL}")
+ log(" Geolocation ........................ Enabled$${EOL}")
} else {
- log("Geolocation....................... Not enabled (Requires Qt Positioning module)$${EOL}")
+ log(" Geolocation ........................ Not enabled (Requires Qt Positioning module)$${EOL}")
+ }
+ unix:!darwin {
+ use?(nss) {
+ log(" Certificate handling ............... Using system NSS$${EOL}")
+ } else {
+ log(" Certificate handling ............... Using bundled BoringSSL$${EOL}")
+ }
}
osx {
use?(appstore_compliant_code) {
- log("AppStore Compliant ............... Enabled$${EOL}")
+ log(" Mac App Store Compliant ............ Enabled$${EOL}")
+ } else {
+ log(" Mac App Store Compliant ............ Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}")
+ }
+ use?(native_spellchecker) {
+ log("Native Spellchecker .............. Enabled$${EOL}")
} else {
- log("AppStore Compliant ............... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}")
+ log("Native Spellchecker .............. Not enabled (Default, enable with WEBENGINE_CONFIG+=use_native_spellchecker)$${EOL}")
}
!isMinOSXSDKVersion(10, 10, 3) {
- log("Force Touch API usage ............ Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
+ log(" Force Touch API usage .............. Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
}
}
}
diff --git a/tools/qmake/mkspecs/features/default_post.prf b/tools/qmake/mkspecs/features/default_post.prf
deleted file mode 100644
index 64e8cb1fe..000000000
--- a/tools/qmake/mkspecs/features/default_post.prf
+++ /dev/null
@@ -1,11 +0,0 @@
-load(default_post)
-load(functions)
-
-root_project_file:isPlatformSupported(): finalizeConfigure()
-
-!isEmpty(skipBuildReason) {
- SUBDIRS =
- export(SUBDIRS)
- log($${skipBuildReason}$${EOL})
- log(QtWebEngine will not be built.$${EOL})
-}
diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf
index 27aded013..77e437bc9 100644
--- a/tools/qmake/mkspecs/features/default_pre.prf
+++ b/tools/qmake/mkspecs/features/default_pre.prf
@@ -1,6 +1,3 @@
-# Resolve root directories for sources
-QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,)
-
# We depend on libc++ to build chromium so our macosx-version-min has to be 10.7
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
@@ -24,14 +21,3 @@ EOL = $$escape_expand(\\n)
# Call the original default_pre.
load(default_pre)
load(functions)
-
-# Check platform support and run config tests early enough to bail
-equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): CONFIG += root_project_file
-
-root_project_file:isPlatformSupported() {
- !exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium) {
- error("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
- }
- load(configure)
- runConfigure()
-}
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index c8fd278b4..236ee8ac5 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -1,4 +1,20 @@
+defineTest(isQtMinimum) {
+ !equals(QT_MAJOR_VERSION, $$1): return(false)
+ count(ARGS, 1, greaterThan) {
+ lessThan(QT_MINOR_VERSION, $$2): return(false)
+ }
+ return(true)
+}
+
+!isQtMinimum(5, 8) {
+ defineTest(qtConfig) {
+ contains(QT_CONFIG, $$1): return(true)
+ return(false)
+ }
+}
+
defineTest(isPlatformSupported) {
+ QT_FOR_CONFIG += gui-private
linux {
!gcc:!clang {
skipBuild("Qt WebEngine on Linux requires clang or GCC.")
@@ -11,20 +27,24 @@ defineTest(isPlatformSupported) {
return(false)
}
msvc {
- !equals(MSVC_VER, "12.0"):!equals(MSVC_VER, "14.0") {
- skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.")
+ !equals(MSVC_VER, "14.0") {
+ skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.")
return(false)
}
} else {
- skipBuild("Qt WebEngine on Windows requires MSVC 2013 or MSVC 2015.")
+ skipBuild("Qt WebEngine on Windows requires MSVC 2015 Update 2 or later.")
return(false)
}
isBuildingOnWin32() {
skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
}
+ !isMinWinSDKVersion(10, 10586): {
+ skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.10586 or newer.")
+ return(false)
+ }
} else:osx {
- lessThan(QMAKE_XCODE_VERSION, 6.1) {
- skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 6.1 is required to build Qt WebEngine.")
+ lessThan(QMAKE_XCODE_VERSION, 5.1) {
+ skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.")
return(false)
}
# We require OS X 10.9 (darwin version 13.0.0) or newer
@@ -46,7 +66,7 @@ defineTest(isPlatformSupported) {
skipBuild("C++11 support is required in order to build chromium.")
return(false)
}
- contains(QT_CONFIG, mirclient) {
+ qtConfig(mirclient) {
skipBuild("Mir is not yet supported as graphics backend for Qt WebEngine.")
return(false)
}
@@ -56,6 +76,7 @@ defineTest(isPlatformSupported) {
}
!isPythonVersionSupported(): return(false)
!isArchSupported(): return(false)
+ isSanitizerEnabled():!isSanitizerSupported():!forceSanitizerBuild(): return(false)
return(true)
}
@@ -87,6 +108,106 @@ defineTest(isPythonVersionSupported) {
return(false)
}
+defineTest(isSanitizerEnabled) {
+ sanitize_address|sanitize_memory|sanitize_undefined|sanitize_thread: return(true)
+ return(false)
+}
+
+defineTest(forceSanitizerBuild) {
+ contains(WEBENGINE_CONFIG, force_sanitizer_build): return(true)
+ skipBuild("Chosen sanitizer configuration is not supported. Use WEBENGINE_CONFIG+=force_sanitizer_build to force build with the chosen sanitizer configuration.")
+ return(false)
+}
+
+defineTest(isSanitizerSupported) {
+ sanitizer_combo_supported = true
+ sanitize_address {
+ asan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux() {
+ asan_supported = true
+ } else:macos:isSanitizerSupportedOnMacOS() {
+ asan_supported = true
+ }
+ !$$asan_supported {
+ sanitizer_combo_supported = false
+ warning("An address sanitizer-enabled Qt WebEngine build can only be built on Linux or macOS using Clang and libc++.")
+ }
+ }
+
+ sanitize_memory {
+ sanitizer_combo_supported = false
+ warning("A memory sanitizer-enabled Qt WebEngine build is not supported.")
+ }
+
+ sanitize_undefined {
+ ubsan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux():CONFIG(release, debug|release):!debug_and_release {
+ ubsan_supported = true
+ }
+ !$$ubsan_supported {
+ sanitizer_combo_supported = false
+ warning("An undefined behavior sanitizer-enabled Qt WebEngine build can only be built on Linux using Clang and libc++ in release mode.")
+ }
+ }
+
+ sanitize_thread {
+ tsan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux() {
+ tsan_supported = true
+ }
+ !$$tsan_supported {
+ sanitizer_combo_supported = false
+ warning("A thread sanitizer-enabled Qt WebEngine build can only be built on Linux using Clang and libc++.")
+ }
+ }
+
+ $$sanitizer_combo_supported: return(true)
+ return(false)
+}
+
+defineTest(isSanitizerSupportedOnLinux) {
+ isSanitizerLinuxClangVersionSupported(): return(true)
+ return(false)
+}
+
+defineTest(isSanitizerSupportedOnMacOS) {
+ isEmpty(QT_APPLE_CLANG_MAJOR_VERSION) {
+ QTWEBENGINE_CLANG_IS_APPLE = false
+ } else {
+ QTWEBENGINE_CLANG_IS_APPLE = true
+ }
+ $$QTWEBENGINE_CLANG_IS_APPLE:isSanitizerMacOSAppleClangVersionSupported(): return(true)
+ else:isSanitizerMacOSClangVersionSupported(): return(true)
+ return(false)
+}
+
+defineTest(isSanitizerMacOSAppleClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from Apple Clang version 7.3.0+.
+ greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 7): return(true)
+ greaterThan(QT_APPLE_CLANG_MINOR_VERSION, 2): return(true)
+
+ warning("Using Apple Clang version $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}.$${QT_APPLE_CLANG_PATCH_VERSION}, but at least Apple Clang version 7.3.0 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
+defineTest(isSanitizerMacOSClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from non-apple Clang version 3.7+.
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3): return(true)
+ greaterThan(QT_CLANG_MINOR_VERSION, 6): return(true)
+
+ warning("Using Clang version $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
+defineTest(isSanitizerLinuxClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from Clang version 3.7+.
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3): return(true)
+ greaterThan(QT_CLANG_MINOR_VERSION, 6): return(true)
+
+ warning("Using Clang version $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
defineTest(isGCCVersionSupported) {
# The below will work for gcc 4.7 and up and also match gcc 5
greaterThan(QT_GCC_MINOR_VERSION, 6):return(true)
@@ -96,7 +217,7 @@ defineTest(isGCCVersionSupported) {
}
defineTest(isQMLTestSupportApiEnabled) {
- contains(QT_CONFIG, private_tests): return(true) # enable for developer-build
+ qtConfig(private_tests): return(true) # enable for developer-build
contains(QT_BUILD_PARTS, tests): return(true)
contains(WEBENGINE_CONFIG, testsupport): return(true)
return(false)
@@ -134,6 +255,22 @@ defineTest(isMinOSXSDKVersion) {
return(false)
}
+defineTest(isMinWinSDKVersion) {
+ requested_major = $$1
+ requested_minor = $$2
+ WIN_SDK_VERSION = $$(WindowsSDKVersion)
+
+ # major.0.minor
+ major_version = $$section(WIN_SDK_VERSION, ., 0, 0)
+ minor_version = $$section(WIN_SDK_VERSION, ., 2, 2)
+
+ greaterThan(major_version, $$requested_major):return(true)
+ equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
+ equals(major_version, $$requested_major):equals(minor_version, $$requested_minor)::return(true)
+
+ return(false)
+}
+
# Map to the correct target type for gyp
defineReplace(toGypTargetType) {
equals(TEMPLATE, "app"):return("executable")
@@ -238,28 +375,17 @@ defineReplace(findOrBuildNinja) {
!exists($$out) {
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- out = $$shadowed($$absolute_path("ninja/ninja", "$$src_3rd_party_dir"))
+ out = $$shadowed($$absolute_path(ninja/ninja, $$src_3rd_party_dir))
win32: out = $${out}.exe
- out = $$system_path($$out)
# If we did not find ninja, then we bootstrap it.
!exists($$out) {
- # If we are making a shadow build, copy the ninja sources to the build directory.
- !equals(PWD, $${OUT_PWD}) {
- log("Build directory is different from source directory - copying ninja sources to the build tree...")
- shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir))
-
- !exists($$dirname(out)): mkpath($$dirname(out))
- copy_dir_files {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$dirname(out))")
- } else {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
- }
- }
- system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap")
+ mkpath($$dirname(out))
+ ninja_configure = $$absolute_path(ninja/configure.py, $$src_3rd_party_dir)
+ system("cd $$system_quote($$system_path($$dirname(out))) && python $$system_quote($$system_path($$ninja_configure)) --bootstrap")
}
}
- return($$out)
+ return($$system_path($$out))
}
defineTest(skipBuild) {
diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf
index 4cf7cd2f4..2fbd74730 100644
--- a/tools/qmake/mkspecs/features/gyp_generator.prf
+++ b/tools/qmake/mkspecs/features/gyp_generator.prf
@@ -14,6 +14,8 @@ defineReplace(mocAction) {
OUTPUT_NAME = $$mocOutput($$INPUT_FILE)
DEFINES_LIST = $$join(DEFINES, " -D", -D)
INCPATH = $$join(INCLUDEPATH, " -I", -I)
+ # we don't generate a moc_predef file yet.
+ MOC_PREDEF_FILE =
MOC_COMMAND = $$clean_path($$mocCmdBase())
MOC_COMMAND = $$replace(MOC_COMMAND, $$re_escape("$(DEFINES)"), $$DEFINES_LIST)
MOC_COMMAND = $$replace(MOC_COMMAND, $$re_escape("$(INCPATH)"), $$INCPATH)
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py
index 25b3dc15e..316805b6d 100755
--- a/tools/scripts/take_snapshot.py
+++ b/tools/scripts/take_snapshot.py
@@ -44,8 +44,6 @@ os.chdir(qtwebengine_root)
def isInGitBlacklist(file_path):
# We do need all the gyp files.
- if file_path.endswith('.gyp') or file_path.endswith('.gypi') or file_path.endswith('.isolate'):
- False
if ( '.gitignore' in file_path
or '.gitmodules' in file_path
or '.gitattributes' in file_path
@@ -59,6 +57,10 @@ def isInChromiumBlacklist(file_path):
# We do need all the gyp files.
if file_path.endswith('.gyp') or file_path.endswith('.gypi') or file_path.endswith('.isolate'):
return False
+ # We do need all the gn file.
+ if file_path.endswith('.gn') or file_path.endswith('.gni') or file_path.endswith('typemap') or \
+ file_path.endswith('.mojom'):
+ return False
if ( '_jni' in file_path
or 'jni_' in file_path
or 'testdata/' in file_path
@@ -91,9 +93,17 @@ def isInChromiumBlacklist(file_path):
not 'third_party/chromevox' in file_path and
not 'media/desktop_media_list.h' in file_path and
not 'media/desktop_streams_registry.' in file_path and
+ not 'common/chrome_constants.' in file_path and
+ not 'common/chrome_paths' in file_path and
not 'common/chrome_switches.' in file_path and
- not 'common/localized_error.' in file_path and
+ not 'common/content_restriction.h' in file_path and
not 'common/spellcheck_' in file_path and
+ not 'common/url_constants' in file_path and
+ not '/extensions/api/' in file_path and
+ not '/extensions/browser/api/' in file_path and
+ not '/extensions/permissions/' in file_path and
+ not '/renderer_host/pepper/' in file_path and
+ not '/renderer/pepper/' in file_path and
not '/spellchecker/' in file_path and
not '/tools/convert_dict/' in file_path and
not file_path.endswith('cf_resources.rc') and
@@ -105,47 +115,32 @@ def isInChromiumBlacklist(file_path):
or file_path.startswith('chrome_frame')
or file_path.startswith('chromeos')
or file_path.startswith('cloud_print')
- or (file_path.startswith('components') and
- not file_path.startswith('components/cdm') and
- not file_path.startswith('components/device_event_log') and
- not file_path.startswith('components/devtools_') and
- not file_path.startswith('components/error_page') and
- not file_path.startswith('components/keyed_service') and
- not file_path.startswith('components/mime_util') and
- not file_path.startswith('components/precache') and
- not file_path.startswith('components/pref_registry') and
- not file_path.startswith('components/printing') and
- not file_path.startswith('components/resources') and
- not file_path.startswith('components/scheduler') and
- not file_path.startswith('components/security_interstitials') and
- not file_path.startswith('components/startup_metric_utils') and
- not file_path.startswith('components/strings') and
- not file_path.startswith('components/tracing') and
- not file_path.startswith('components/url_formatter') and
- not file_path.startswith('components/user_prefs') and
- not file_path.startswith('components/version_') and
- not file_path.startswith('components/visitedlink') and
- not file_path.startswith('components/web_cache') and
- not file_path.startswith('components/webcrypto') and
- not file_path.startswith('components/webusb') and
- not file_path.endswith('.grd') and
- not file_path.endswith('.grdp') and
- not 'components_strings' in file_path)
+ or file_path.startswith('components/chrome_apps/')
+ or file_path.startswith('components/cronet/')
+ or file_path.startswith('components/drive/')
+ or file_path.startswith('components/invalidation/')
+ or file_path.startswith('components/gcm_driver/')
+ or file_path.startswith('components/mus/')
+ or file_path.startswith('components/nacl/')
+ or file_path.startswith('components/omnibox/')
+ or file_path.startswith('components/policy/')
+ or file_path.startswith('components/proximity_auth/')
+ or (file_path.startswith('components/resources/terms/') and not file_path.endswith('terms_chromium.html'))
+ or file_path.startswith('components/rlz/')
+ or file_path.startswith('components/sync_driver/')
+ or file_path.startswith('components/test/')
+ or file_path.startswith('components/test_runner/')
+ or file_path.startswith('components/translate/')
or file_path.startswith('content/public/android/java')
or (file_path.startswith('content/shell') and
- not file_path.startswith('content/shell/common'))
+ not file_path.startswith('content/shell/common') and
+ not file_path.endswith('.grd'))
or file_path.startswith('courgette')
- or (file_path.startswith('extensions') and
- not 'browser/extension_function_registry.h' in file_path and
- not 'browser/extension_function_histogram_value.h' in file_path and
- not 'browser/notification_types.cc' in file_path and
- not 'browser/notification_types.h' in file_path)
or file_path.startswith('google_update')
or file_path.startswith('ios')
or file_path.startswith('media/base/android/java')
or file_path.startswith('native_client')
or file_path.startswith('net/android/java')
- or file_path.startswith('pdf')
or file_path.startswith('remoting')
or file_path.startswith('rlz')
or file_path.startswith('sync')
@@ -185,7 +180,8 @@ def isInChromiumBlacklist(file_path):
or file_path.startswith('third_party/jsr-305/src')
or file_path.startswith('third_party/junit')
or file_path.startswith('third_party/libphonenumber')
- or file_path.startswith('third_party/libaddressinput')
+ or file_path.startswith('third_party/libaddressinput/src/testdata')
+ or file_path.startswith('third_party/libaddressinput/src/common/src/test')
or file_path.startswith('third_party/libc++')
or file_path.startswith('third_party/liblouis')
or file_path.startswith('third_party/lighttpd')
@@ -195,32 +191,22 @@ def isInChromiumBlacklist(file_path):
or (file_path.startswith('third_party/polymer') and
not file_path.startswith('third_party/polymer/v1_0/components-chromium/'))
or file_path.startswith('third_party/openh264/src/res')
+ or file_path.startswith('third_party/pdfium/tools')
or file_path.startswith('third_party/pdfsqueeze')
or file_path.startswith('third_party/pefile')
or file_path.startswith('third_party/perl')
- or file_path.startswith('third_party/pdfium')
or file_path.startswith('third_party/psyco_win32')
or file_path.startswith('third_party/scons-2.0.1')
or file_path.startswith('third_party/sfntly/src/cpp/data/fonts')
or file_path.startswith('third_party/trace-viewer')
or file_path.startswith('third_party/undoview')
or file_path.startswith('third_party/webgl')
+ or file_path.startswith('tools/android')
+ or file_path.startswith('tools/luci_go')
+ or file_path.startswith('tools/metrics')
or file_path.startswith('tools/memory_inspector')
- or (file_path.startswith('tools') and
- not file_path.startswith('tools/clang') and
- not file_path.startswith('tools/compile_test') and
- not file_path.startswith('tools/generate_library_loader') and
- not file_path.startswith('tools/generate_shim_headers') and
- not file_path.startswith('tools/generate_stubs') and
- not file_path.startswith('tools/grit') and
- not file_path.startswith('tools/gyp') and
- not file_path.startswith('tools/json_comment_eater') and
- not file_path.startswith('tools/json_schema_compiler') and
- not file_path.startswith('tools/idl_parser') and
- not file_path.startswith('tools/memory') and
- not file_path.startswith('tools/msan') and
- not file_path.startswith('tools/protoc_wrapper') and
- not file_path.startswith('tools/ubsan'))
+ or file_path.startswith('tools/perf')
+ or file_path.startswith('tools/swarming_client')
or file_path.startswith('ui/android/java')
or file_path.startswith('ui/app_list')
or file_path.startswith('ui/base/ime/chromeos')
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index 6029bbdc9..e481f0ed0 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -38,9 +38,9 @@ import json
import urllib2
import git_submodule as GitSubmodule
-chromium_version = '49.0.2623.111'
-chromium_branch = '2623'
-ninja_version = 'v1.6.0'
+chromium_version = '53.0.2785.148'
+chromium_branch = '2785'
+ninja_version = 'v1.7.1'
json_url = 'http://omahaproxy.appspot.com/all.json'
diff --git a/tools/scripts/windeploy-examples.py b/tools/scripts/windeploy-examples.py
new file mode 100755
index 000000000..c41a5bc31
--- /dev/null
+++ b/tools/scripts/windeploy-examples.py
@@ -0,0 +1,393 @@
+#!/usr/bin/env python
+
+#############################################################################
+#
+# Copyright (C) 2015 The Qt Company Ltd.
+# Contact: http://www.qt.io/licensing/
+#
+# This file is part of the QtWebEngine module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:LGPL$
+# Commercial License Usage
+# Licensees holding valid commercial Qt licenses may use this file in
+# accordance with the commercial license agreement provided with the
+# Software or, alternatively, in accordance with the terms contained in
+# a written agreement between you and The Qt Company. For licensing terms
+# and conditions see http://www.qt.io/terms-conditions. For further
+# information use the contact form at http://www.qt.io/contact-us.
+#
+# GNU Lesser General Public License Usage
+# Alternatively, this file may be used under the terms of the GNU Lesser
+# General Public License version 2.1 as published by the Free Software
+# Foundation and appearing in the file LICENSE.LGPL included in the
+# packaging of this file. Please review the following information to
+# ensure the GNU Lesser General Public License version 2.1 requirements
+# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+#
+# As a special exception, The Qt Company gives you certain additional
+# rights. These rights are described in The Qt Company LGPL Exception
+# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+#
+# GNU General Public License Usage
+# Alternatively, this file may be used under the terms of the GNU
+# General Public License version 3.0 as published by the Free Software
+# Foundation and appearing in the file LICENSE.GPL included in the
+# packaging of this file. Please review the following information to
+# ensure the GNU General Public License version 3.0 requirements will be
+# met: http://www.gnu.org/copyleft/gpl.html.
+#
+#
+# $QT_END_LICENSE$
+#
+#############################################################################
+
+import argparse
+import os
+import re
+import subprocess
+import shutil
+import sys
+
+
+class Api:
+ QUICK = "webengine"
+ WIDGET = "webenginewidgets"
+
+
+class Mode:
+ RELEASE = "release"
+ DEBUG = "debug"
+
+
+def is_windows():
+ return os.name == "nt"
+
+
+class ArgManager(object):
+ def __init__(self):
+ try:
+ self.__args = self.__parse()
+ except:
+ raise
+
+ self.build_dir = self.__args.build_dir
+ self.src_dir = self.__args.src_dir
+ self.example_filter = re.compile("%s-%s-%s" % (self.__api_filter(), self.__name_filter(), self.__mode_filter()))
+ self.list_examples = self.__args.list_examples
+ self.force = self.__args.force
+ self.verbose = self.__args.verbose
+ self.out_dir = self.__args.out_dir
+
+ def __parse(self):
+ ap = argparse.ArgumentParser(description="Deploy QtWebEngine example binaries on Windows.")
+ ap.add_argument("--release", dest="release", action="store_true", default=False,
+ help="Deploy release binaries only")
+ ap.add_argument("--debug", dest="debug", action="store_true", default=False,
+ help="Deploy debug binaries only")
+ ap.add_argument("--quick", dest="quick", action="store_true", default=False,
+ help="Deploy quick examples only")
+ ap.add_argument("--widget", dest="widget", action="store_true", default=False,
+ help="Deploy widget examples only")
+ ap.add_argument("-e", "--examples", dest="examples", nargs="+", action="store", default=".*",
+ help="Select example to deploy")
+ ap.add_argument("-l", "--list-examples", dest="list_examples", action="store_true", default=False,
+ help="List available examples")
+ ap.add_argument("-f", "--force", dest="force", action="store_true", default=False,
+ help="Force to overwrite existing files")
+ ap.add_argument("-v", "--verbose", dest="verbose", action="store_true", default=False,
+ help="Print windeployqt output")
+ ap.add_argument("--src-dir", dest="src_dir", action="store", type=self.__validate_src_dir, default=None,
+ help="Specify path of Qt sources. It is used for finding QML files of the example"
+ "and scanning for QML imports")
+ ap.add_argument("--build-dir", dest="build_dir", action="store", type=self.__validate_build_dir, default=None,
+ help="Specify path of the Qt binaries. It is used for finding qmake.exe, windeployqt.exe and"
+ "binaries of the examples. It is not necessary to set if qmake.exe is set in the path")
+ ap.add_argument("-o", "--out-dir", dest="out_dir", action="store", default=os.getcwd(),
+ help="Specify path for the deployed examples. If it is not set"
+ "current working directory is used")
+ return ap.parse_args()
+
+ def __validate_src_dir(self, src_dir):
+ if not os.path.exists(src_dir):
+ raise OSError("The specified Qt source directory does not exist: %s" % src_dir)
+
+ qtwebengine_dir = src_dir
+ # Accept Qt top level source directory too
+ if os.path.exists(os.path.join(src_dir, "qtwebengine")):
+ qtwebengine_dir = os.path.join(src_dir, "qtwebengine")
+
+ examples_dir = os.path.join(qtwebengine_dir, "examples")
+ must_have_paths = [
+ os.path.join(examples_dir, "examples.pro"),
+ os.path.join(examples_dir, Api.QUICK),
+ os.path.join(examples_dir, Api.WIDGET),
+ ]
+
+ # Check whether src_dir is the proper QtWebEngine source directory
+ for p in must_have_paths:
+ if not os.path.exists(p):
+ raise OSError("The specified Qt source directory is invalid: %s" % src_dir)
+
+ return src_dir
+
+ def __validate_build_dir(self, build_dir):
+ if not os.path.exists(build_dir):
+ raise OSError("The specified Qt build directory does not exist: %s" % build_dir)
+
+ # Accept QtWebEngine build directory too
+ if os.path.basename(build_dir) == "qtwebengine":
+ build_dir = os.path.abspath(os.path.join(build_dir, ".."))
+
+ # Attempt to support custom build directories
+ if os.path.exists(os.path.join(build_dir, "bin", "qmake.exe")):
+ return build_dir
+
+ # Check existence of qtbase/bin/qmake.exe
+ qtbase_dir = os.path.join(build_dir, "qtbase")
+ if not os.path.exists(os.path.join(qtbase_dir, "bin", "qmake.exe")):
+ raise OSError("Program 'qmake.exe' cannot be found in the specified Qt build directory: %s" % build_dir)
+
+ return qtbase_dir
+
+ def __mode_filter(self):
+ if self.__args.release and not self.__args.debug:
+ return Mode.RELEASE
+ if not self.__args.release and self.__args.debug:
+ return Mode.DEBUG
+ return ".*"
+
+ def __api_filter(self):
+ if self.__args.quick and not self.__args.widget:
+ return Api.QUICK
+ if not self.__args.quick and self.__args.widget:
+ return Api.WIDGET
+ return ".*"
+
+ def __name_filter(self):
+ alt_list = []
+
+ examples = self.__args.examples
+ if not isinstance(examples, list):
+ examples = [examples]
+
+ for e in examples:
+ if "," in e:
+ alt_list.extend(e.split(","))
+ else:
+ alt_list.append(e)
+
+ return "|".join(alt_list)
+
+
+class QtHelper(object):
+ def __init__(self, build_path=None, src_path=None):
+ self.__build_path = build_path if build_path is not None else ""
+ self.__src_path = src_path if src_path is not None else ""
+ self.__query = {}
+ self.__angle = None
+
+ self.__qmake = "qmake.exe"
+ self.__windeployqt = "windeployqt.exe"
+ if build_path:
+ self.__qmake = os.path.join(self.__build_path, "bin", self.__qmake)
+ self.__windeployqt = os.path.join(self.__build_path, "bin", self.__windeployqt)
+
+ try:
+ program = self.__qmake
+ subprocess.check_output([program, "-v"])
+ program = self.__windeployqt
+ subprocess.check_output([program, "-h"])
+ except OSError as e:
+ raise OSError("Program '%s' cannot be executed\n%s" % (program, e))
+ except:
+ raise
+
+ self.__query = self.get_query()
+ self.__build_path = self.get_build_path()
+ self.__src_path = self.get_src_path()
+ self.__angle = self.has_angle()
+
+ def get_query(self):
+ if self.__query:
+ return self.__query
+
+ qmake_output = subprocess.check_output([self.__qmake, "-query"]).split("\r\n")
+ query = {}
+ for line in qmake_output:
+ entry = line.split(":", 1)
+ if len(entry) != 2:
+ continue
+ query[entry[0]] = entry[1]
+ return query
+
+ def get_build_path(self):
+ return os.path.abspath(os.path.join(self.__query["QT_INSTALL_PREFIX"], ".."))
+
+ def get_src_path(self):
+ if self.__src_path:
+ return self.__src_path
+
+ if "QT_INSTALL_PREFIX/src" in self.__query:
+ return os.path.abspath(os.path.join(self.__query["QT_INSTALL_PREFIX/src"], ".."))
+
+ return self.__build_path
+
+ def get_windeployqt(self):
+ return self.__windeployqt
+
+ def has_angle(self):
+ if self.__angle:
+ return self.__angle
+
+ qconfig_pri_path = os.path.abspath(os.path.join(self.__query["QT_HOST_PREFIX"], "mkspecs", "qconfig.pri"))
+ print(qconfig_pri_path)
+ if not os.path.exists(qconfig_pri_path):
+ sys.stderr.write("Configuration file qconfig.pri cannot be found. Fallback to desktop GL mode.\n")
+ return False
+
+ qt_config = []
+
+ qconfig_pri = open(qconfig_pri_path, "r")
+ for line in qconfig_pri:
+ if line.startswith("QT_CONFIG +="):
+ qt_config = re.match("^QT_CONFIG \+= (.+)$", line).group(1).split(" ")
+ qconfig_pri.close()
+
+ return "angle" in qt_config
+
+ def collect_examples(self):
+ examples = []
+
+ for api in [Api.QUICK, Api.WIDGET]:
+ examples_root_dir_path = os.path.join(self.__build_path, "qtwebengine", "examples", api)
+ if not os.path.exists(examples_root_dir_path):
+ continue
+
+ for example in os.listdir(examples_root_dir_path):
+ example_dir_path = os.path.join(examples_root_dir_path, example)
+ if not os.path.exists(example_dir_path):
+ continue
+
+ example_src_path = os.path.join(self.__src_path, "qtwebengine", "examples", api, example)
+
+ for mode in [Mode.RELEASE, Mode.DEBUG]:
+ example_exe_path = os.path.join(example_dir_path, mode, example + ".exe")
+ if not os.path.exists(example_exe_path):
+ continue
+ examples.append(Example(example, api, mode, self.__angle, example_exe_path, example_src_path))
+
+ return examples
+
+
+class Example(str):
+ def __new__(cls, example, api, mode, angle, exe_path, src_path):
+ obj = str.__new__(cls, "%s-%s-%s" % (api, example, mode))
+ return obj
+
+ def __init__(self, example, api, mode, angle, exe_path, src_path):
+ super(Example, self).__init__("%s-%s-%s" % (api, example, mode))
+ self.__name = example
+ self.__api = api
+ self.__mode = mode
+ self.__angle = angle
+ self.__exe_path = exe_path
+ self.__src_path = src_path
+
+ def get_deploy_params(self, mode, force):
+ deploy_params = []
+ deploy_params.append("--%s" % mode)
+ deploy_params.append("--compiler-runtime")
+
+ if self.__angle:
+ deploy_params.append("--angle")
+
+ if force:
+ deploy_params.append("--force")
+
+ if self.__api is Api.QUICK:
+ deploy_params.append("--qmldir")
+ deploy_params.append(self.__src_path)
+
+ if self.__mode is Mode.DEBUG:
+ deploy_params.append("--pdb")
+
+ return deploy_params
+
+ def name(self):
+ return self.__name
+
+ def deploy(self, qt, dest_path, force=False, verbose=False):
+ src_path = os.path.dirname(self.__exe_path)
+ for f in os.listdir(src_path):
+ shutil.copy(os.path.join(src_path, f), dest_path)
+
+ deploy_command = []
+ deploy_command.append(qt.get_windeployqt())
+ # Debug executables also need the release libraries
+ deploy_command.extend(self.get_deploy_params(Mode.RELEASE, force))
+ deploy_command.append(dest_path)
+
+ if verbose:
+ print("%s" % " ".join(deploy_command))
+
+ out = None if verbose else open(os.devnull, "w")
+ exit_code = subprocess.call(deploy_command, stdout=out)
+
+ if self.__mode is Mode.DEBUG and not exit_code:
+ param_release = "--%s" % Mode.RELEASE
+ param_debug = "--%s" % Mode.DEBUG
+ deploy_command = map(lambda item: param_debug if item == param_release else item, deploy_command)
+
+ if verbose:
+ print("%s" % " ".join(deploy_command))
+
+ exit_code = subprocess.call(deploy_command, stdout=out)
+
+ if out is not None:
+ out.close()
+
+ return exit_code
+
+
+def main():
+ try:
+ args = ArgManager()
+
+ if not is_windows():
+ raise OSError("This script works on Windows only\n")
+
+ qt = QtHelper(args.build_dir, args.src_dir)
+ except Exception as e:
+ sys.stderr.write(str(e))
+ exit(1)
+
+ example_list = filter((lambda e: args.example_filter.match(e)), qt.collect_examples())
+ if not example_list:
+ print("There is no example that fulfills the requirements")
+ return
+
+ for example in example_list:
+ if args.list_examples:
+ print(example.name())
+ continue
+
+ print("Deploying %s ..." % example.name())
+ dest_path = os.path.abspath(os.path.join(args.out_dir, example.name()))
+ if not os.path.exists(dest_path):
+ os.makedirs(dest_path)
+ elif os.listdir(dest_path) and not args.force:
+ sys.stderr.write("Destination directory is not empty: %s\n" % dest_path)
+ sys.stderr.write("Skip deploying %s\n" % example.name())
+ continue
+
+ exit_code = example.deploy(qt, dest_path, args.force, args.verbose)
+ if exit_code:
+ sys.stderr.write("Deploy of example '%s' has failed: %s\n" % (example.name(), exit_code))
+ exit(exit_code)
+
+ print("Example '%s' has been successfully deployed at %s" % (example.name(), dest_path))
+
+ return
+
+if __name__ == "__main__":
+ main()