/*
 * Copyright (C) 2015 The Qt Company Ltd.
 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
 * Copyright (c) 2012 Hewlett-Packard Development Company, L.P.
 *
 * 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 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this program; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */

// The documentation in this file was imported from QtWebKit and is thus constrained
// by its LGPL license.

/*!
    \qmltype WebEngineView
    \instantiates QQuickWebEngineView
    \inqmlmodule QtWebEngine
    \since QtWebEngine 1.0
    \brief A WebEngineView renders web content within a QML application.

    The WebEngineView type enables QML applications to render regions of dynamic web content. It
    may share the screen with other QML types, such as a TabView, or fill the screen, as specified
    within the QML application.

    \section2 Initializing Web Engine

    For the web engine view to be rendered, the web engine must be initialized by using
    \l QtWebEngine::initialize in the application main source file, as illustrated by the
    following code snippet:

    \quotefromfile webengine/minimal/main.cpp
    \skipto main
    \printuntil }

    \section2 Loading Web Pages

    An application can load pages into the WebEngineView, using either the \l url property or the
    \l loadHtml method and navigate within the view's session history. The GET
    method is always used to load URLs.

    The history is represented by a WebEngineHistory data model that is held by
    the \l navigationHistory property.

    The following sample QML application loads a web page using the \c url property:

    \quotefromfile webengine/minimal/main.qml
    \skipto import
    \printuntil /^\}/

    The \l loading property holds whether an HTML page is currently loading.
    The \l loadingChanged() signal is emitted when loading the page begins, ends, or fails.

    The title of an HTML page can be accessed with the \l title property. Additionally, a web
    page may specify an icon, which can be accessed using the \l icon property. The \l zoomFactor
    property enables zooming the contents of the web page by a scale factor.

    If a certificate error is raised while loading a web page, the \l certificateError() signal is
    emitted. Certificate errors are handled by using the methods of the WebEngineCertificateError
    type.

    \section2 Interaction

    By default, links to different pages load within the same WebEngineView object, but web sites
    may request them to be opened as a new tab, window, or dialog. The \l newViewRequested() signal
    is emitted when a request to load the page in a separate web engine view is issued. The
    NewViewDestination property describes how the new view should be opened. In addition, the
    WebEngineNewViewRequest utility type can be used to load web pages in separate web engine views.

    The \l findText() method can be used to search for a string on a web page, using the options
    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.

    The \l linkHovered() signal is emitted when a mouse pointer passes over a link and thus
    corresponds to the \c{mouseover} DOM event.

    Actions, such as selecting and editing content, can be performed on a web page by using the
    \l triggerWebAction() method. The available actions are described by the \l WebAction property.

    The \l backgroundColorChanged() signal is emitted when the web page background color changes.

    \section2 User Scripts

    During the loading of a page, so called \e {user scripts} can be injected in the JavaScript
    engine at different points. The script objects attached to the web engine view are held by the
    \l userScripts property and injected by using the WebEngineScript type. Scripts can also be run
    by using the runJavaScript() method in the same world as other scripts that are part of the
    loaded site.

    The \l webChannel property can be used to expose a WebChannel instance in the JavaScript context
    of the page it is rendering as \c qt.webChannelTransport.

    \section2 Fullscreen Mode

    A web page can request through the JavaScript API to be loaded in fullscreen mode. The
    \l fullScreenRequested() signal is emitted when the web page issues the request. The
    WebEngineFullScreenRequest utility type can be used to toggle fullscreen requests. The
    \l fullScreenCancelled method can be used to notify the browser engine when the windowing
    system forces the application to leave fullscreen mode.

    \section2 Profiles

    Web engine views can be isolated from each other by using the WebEngineProfile type. A profile
    contains settings, scripts, and the list of visited links shared by all views that belong to the
    profile. For example, a dedicated profile could be created for a \e {private browsing} mode. The
    current profile for the view is held by the \l profile property and the current settings are
    held by the \l settings property. The settings are specified by using the WebEngineSettings
    type.

    \section2 Platform Features

    Web pages can request access to platform features, such as geolocation or audio and video
    capture devices. The \l featurePermissionRequested() signal is emitted when a web page requests
    to make use of a resource. The supported platform features are described by the \l Feature
    property. If users grant the permission, the \l grantFeaturePermission() method is used to set
    it to \e granted.

    \section2 Rendering to OpenGL Surface

    When using a QQuickRenderControl to render a Qt Quick user interface to an OpenGL surface, the
    WebEngineView type is not rendered correctly. The web engine view attempts to use a global
    OpenGL context created by \l QtWebEngine::initialize, but there is no public API for accessing
    that context in order to share it with the \c QQuickRenderControl context.

    To have the web engine view rendered correctly, it is possible to manually create a new
    offscreen context that is shared with the \c QQuickRenderControl and to call the non-public
    function \c qt_gl_set_global_share_context(), rather than calling \c initialize().
    If \c initialize() is called after setting a global context, it will do nothing.
*/

/*!
    \qmlmethod void WebEngineView::goBack()

    Go backward within the browser's session history, if possible.
    This function is equivalent to the \c{window.history.back()} DOM method.

    \sa canGoBack
*/

/*!
    \qmlmethod void WebEngineView::goForward()

    Go forward within the browser's session history, if possible.
    This function is equivalent to the \c{window.history.forward()} DOM method.
*/

/*!
    \qmlmethod void WebEngineView::goBackOrForward(int offset)
    \since QtWebEngine 1.1

    If \a offset is positive, goes forward the specified number of offset
    pages in the current session history. If offset is negative, it goes
    back. If the offset is invalid, the page is not changed.

    \sa goBack(), goForward()
*/

/*!
    \qmlmethod void WebEngineView::stop()

    Stops loading the current page.
*/

/*!
    \qmlmethod void WebEngineView::reload()

    Reloads the current page. This function is equivalent to the
    \c{window.location.reload()} DOM method.

    \sa reloadAndBypassCache()
*/

/*!
    \qmlmethod void WebEngineView::reloadAndBypassCache()
    \since QtWebEngine 1.1

    Reloads the current page, ignoring any cached content.

    \sa reload()
*/

/*!
    \qmlproperty url WebEngineView::url

    The location of the currently displayed HTML page. This writable
    property offers the main interface to load a page into a web view.
    It functions the same as the \c{window.location} DOM property.

    \sa loadHtml()
*/

/*!
    \qmlproperty url WebEngineView::icon
    \readonly

    The location of the currently displayed web site icon,
    also known as favicon or shortcut icon. This read-only URL corresponds to
    the image used within a mobile browser application to represent a
    bookmarked page on the device's home screen.

    The following snippet uses the \c{icon} property to build an \c{Image}
    component:

    \qml
    Image {
        id: appIcon
        source: webView.icon != "" ? webView.icon : "fallbackFavIcon.png";
        // ...
    }
    \endqml
*/

/*!
    \qmlproperty int WebEngineView::loadProgress
    \readonly

    The amount of data from the page that has been loaded, expressed
    as an integer percentage in the range from \c{0} to \c{100}.
*/

/*!
    \qmlproperty bool WebEngineView::canGoBack
    \readonly

    Returns \c{true} if there are prior session history entries, \c{false}
    otherwise.
*/

/*!
    \qmlproperty bool WebEngineView::canGoForward
    \readonly

    Returns \c{true} if there are subsequent session history entries,
    \c{false} otherwise.
*/

/*!
    \qmlproperty bool WebEngineView::loading
    \readonly

    Returns \c{true} if the HTML page is currently loading, \c{false} otherwise.
*/

/*!
    \qmlproperty string WebEngineView::title
    \readonly

    The title of the currently displayed HTML page. This is a
    read-only value that reflects the contents of the \c{<title>} tag.
*/

/*!
    \qmlproperty bool WebEngineView::isFullScreen
    \since QtWebEngine 1.1
    \readonly

    Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise.

    \sa fullScreenRequested(), fullScreenCancelled()
*/

/*!
    \qmlproperty WebEngineHistory WebEngineView::navigationHistory
    \since QtWebEngine 1.1
    \readonly

    The navigation history of the current view.

    \sa WebEngineHistory
*/

/*!
    \qmlproperty QQmlWebChannel WebEngineView::webChannel
    \since QtWebEngine 1.1

    The web channel instance used by this view.
    This channel is automatically using the internal QtWebEngine transport mechanism over Chromium IPC,
    and exposed in the javascript context of the page it is rendering as \c qt.webChannelTransport.
    This transport object is used when instantiating the JavaScript counterpart of QWebChannel using
    the \l{Qt WebChannel JavaScript API}.

    \note The view does not take ownership for an assigned webChannel object.
*/

/*!
    \qmlproperty WebEngineProfile WebEngineView::profile
    \since QtWebEngine 1.1

    The current profile used for the view.

    \sa WebEngineProfile
*/

/*!
    \qmlproperty WebEngineSettings WebEngineView::settings
    \readonly
    \since QtWebEngine 1.1

    Settings used by this view.

    \sa WebEngineSettings
*/


/*!
    \qmlproperty list<WebEngineScript> WebEngineView::userScripts
    \readonly
    \since QtWebEngine 1.1

    List of script objects attached to the view.

    \sa WebEngineScript
*/

/*!
    \qmlproperty real WebEngineView::zoomFactor
    \since QtWebEngine 1.1

    Zoom factor for the view. Valid values are within the range from \c{0.25}
    to \c{5.0}. The default factor is \c{1.0}.
*/

/*!
    \qmlmethod void WebEngineView::loadHtml(string html, url baseUrl)
    Loads the specified \a html as the content of the web view.

    This method offers a lower-level alternative to the \c{url} property,
    which references HTML pages via URL.

    External objects, such as stylesheets or images referenced in the HTML
    document, should be located relative to \a baseUrl. For example, if \a html
    is retrieved from \c http://www.example.com/documents/overview.html, which
    is the base URL, then an image referenced with the relative URL, \c diagram.png,
    should be at \c{http://www.example.com/documents/diagram.png}.

    \sa url
*/

/*!
    \qmlmethod void WebEngineView::runJavaScript(string script, variant callback)
    Runs the specified \a script in the content of the web view.

    In case a callback function is provided, it will be invoked after the script
    finishes running.

    \code
    runJavaScript("document.title", function(result) { console.log(result); });
    \endcode

    The script will run in the same \e world as other scripts that are
    part of the loaded site.

    \warning Do not execute lengthy routines in the callback function, because it might block the
    rendering of the web content.

    See WebEngineView::userScripts for an alternative API to inject scripts.
*/

/*!
    \qmlmethod void WebEngineView::findText(string subString)
    \since QtWebEngine 1.1
    Finds the specified string, \a subString, in the page.

    To clear the search highlight, just pass an empty string.
*/

/*!
    \qmlmethod void WebEngineView::findText(string subString, FindFlags options)
    \since QtWebEngine 1.1
    Finds the specified string, \a subString, in the page, using the given \a options.

    To clear the search highlight, just pass an empty string.

    \code
    findText("Qt", WebEngineView.FindBackward | WebEngineView.FindCaseSensitively);
    \endcode
*/

/*!
    \qmlmethod void WebEngineView::findText(string subString, FindFlags options, variant resultCallback)
    \since QtWebEngine 1.1
    Finds the specified string, \a subString, in the page, using the given \a options.

    To clear the search highlight, just pass an empty string.

    The \a resultCallback must take a boolean parameter. It will be called with
    a value of true if the \a subString was found; otherwise the callback value
    will be false.

    \code
    findText("Qt", WebEngineView.FindCaseSensitively, function(success) {
        if (success)
            console.log("Qt was found!");
    });
    \endcode
*/

/*!
    \qmlmethod void WebEngineView::grantFeaturePermission(url securityOrigin, Feature feature, bool granted)
    \since QtWebEngine 1.1

    Sets or unsets the permission, depending on \a granted, for the web site
    identified by \a securityOrigin to use \a feature.

    \sa featurePermissionRequested()
*/


/*!
    \qmlmethod void WebEngineView::fullScreenCancelled()
    \since QtWebEngine 1.1

    Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the
    browser engine when the windowing system forces the application to leave fullscreen mode.

    \qml
    ApplicationWindow {
        onVisibilityChanged: {
            if (webEngineView.isFullScreen && visibility != Window.FullScreen)
                webEngineView.fullScreenCancelled()
        }

        WebEngineView {
            id: webEngineView
            // ...
        }
    }
    \endqml

    \sa isFullScreen, fullScreenRequested()
*/

/*!
    \qmlmethod void WebEngineView::setActiveFocusOnPress(bool arg)
    \since QtWebEngine 1.2

    Sets active focus to a clicked web engine view if \a arg is \c true. By setting it to \c false,
    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()
*/

/*!
    \qmlmethod void WebEngineView::triggerWebAction(WebAction action)
    \since QtWebEngine 1.2

    Triggers the web action \a action.

    \sa WebAction
*/

/*!
    \qmlsignal WebEngineView::featurePermissionRequested(url securityOrigin, Feature feature)
    \since QtWebEngine 1.1

    This signal is emitted when the web site identified by \a securityOrigin requests
    to make use of the resource or device identified by \a feature.

    \sa grantFeaturePermission()
*/

/*!
    \qmlsignal WebEngineView::loadingChanged(WebEngineLoadRequest loadRequest)

    This signal is emitted when a page load begins, ends, or fails.

    When handling the signal with \c onLoadingChanged, various read-only
    parameters are available on the \a loadRequest:

    \table
    \header
        \li Property
        \li Description
    \row
        \li url
        \li The location of the resource that is loading.
    \row
        \li status
        \li The \l{LoadStatus}{load status} of the page.
    \row
        \li errorString
        \li The description of load error.
    \row
        \li errorCode
        \li The HTTP error code.
    \row
        \li errorDomain
        \li The high-level \l{ErrorDomain}{error type}.
    \endtable

    \sa loading, LoadStatus, ErrorDomain
*/

/*!
    \qmlsignal WebEngineView::certificateError(WebEngineCertificateError error)
    \since QtWebEngine 1.1

    This signal is emitted when an invalid certificate error is raised while loading a given request.

    The certificate error can be handled by using the methods of the WebEngineCertificateError
    type.
*/

/*!
    \qmlsignal WebEngineView::linkHovered(url hoveredUrl)

    Within a mouse-driven interface, this signal is emitted when a mouse
    pointer passes over a link, corresponding to the \c{mouseover} DOM
    event. This event may also occur in touch interfaces for \c{mouseover}
    events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl}
    provides the link's location.
*/

/*!
    \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, string message, int lineNumber, string sourceID)
    This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console.

    For example, in case of evaluation errors the source URL may be provided in \a sourceID as well
    as the \a lineNumber.

    \a level indicates the severity of the event that triggered the message, that is, whether it
    was triggered by an error or a less severe event.

    If no handler is specified, the view will log the messages into a \c js
    \l{QLoggingCategory}{logging category}.

    \sa{Console Logging}
*/

/*!
    \qmlsignal WebEngineView::newViewRequested(WebEngineViewRequest request)
    \since QtWebEngine 1.1

    This signal is emitted when a page load is requested to happen in a separate
    web engine view. This can either be because the current page requested it explicitly
    through a JavaScript call to \c window.open, or because the user clicked on a link
    while holding Shift, Ctrl, or a built-in combination that triggers the page to open
    in a new window.

    If this signal is not handled, the requested load will fail.

    An example implementation:

    \snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0

    \sa NewViewDestination, {WebEngine Quick Nano Browser}
*/

/*!
    \qmlsignal WebEngineView::fullScreenRequested(WebEngineFullScreenRequest request)
    \since QtWebEngine 1.1

    This signal is emitted when the web page requests fullscreen mode through the
    JavaScript API.

    \sa isFullScreen
*/

/*!
    \qmlsignal WebEngineView::activeFocusOnPressChanged(bool activeFocusOnPress)
    \since QtWebEngine 1.2

    This signal is emitted when the ability of the web engine view to get focus when clicked
    changes.

    \sa setActiveFocusOnPress()
*/

/*!
    \qmlsignal WebEngineView::backgroundColorChanged()
    \since QtWebEngine 1.2

    This signal is emitted when the web engine view background color changes.
*/

/*!
    \qmlsignal WebEngineView::renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode)

    \since QtWebEngine 1.2

    This signal is emitted when the render process is terminated with a non-zero exit status.
    \a terminationStatus is the termination status of the process and \a exitCode is the status code
    with which the process terminated.

    \sa RenderProcessTerminationStatus
*/

/*!
    \qmlsignal WebEngineView::windowCloseRequested()
    \since QtWebEngine 1.2

    This signal is emitted whenever the page requests the web browser window to be closed,
    for example through the JavaScript \c{window.close()} call.
*/

/*!
    \qmlproperty enumeration WebEngineView::ErrorDomain

    Describes various high-level error types:

    \value WebEngineView.NoErrorDomain
    \value WebEngineView.InternalErrorDomain
            Content fails to be interpreted by Qt WebEngine.
    \value WebEngineView.ConnectionErrorDomain
            Error results from faulty network connection.
    \value WebEngineView.CertificateErrorDomain
            Error related to the SSL/TLS certficate.
    \value WebEngineView.HttpErrorDomain
            Error related to the HTTP connection.
    \value WebEngineView.FtpErrorDomain
            Error related to the FTP connection.
    \value WebEngineView.DnsErrorDomain
            Error related to the DNS connection.
*/

/*!
    \qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel

    Indicates the severity of a JavaScript console message:

    \value  WebEngineView.InfoMessageLevel
            Message is purely informative and can safely be ignored.
    \value  WebEngineView.WarningMessageLevel
            Message indicates there might be a problem that may need attention.
    \value  WebEngineView.ErrorMessageLevel
            Message indicates there has been an error.
*/

/*!
    \qmlproperty enumeration WebEngineView::LoadStatus

    Reflects a page's load status:

    \value  WebEngineView.LoadStartedStatus
            Page is currently loading.
    \value  WebEngineView.LoadSucceededStatus
            Page has successfully loaded, and is not currently loading.
    \value  WebEngineView.LoadFailedStatus
            Page has failed to load, and is not currently loading.
*/

/*!
    \qmlproperty enumeration WebEngineView::NewViewDestination

    Describes how to open a new view:

    \value WebEngineView.NewViewInWindow
            In a separate Window.
    \value WebEngineView.NewViewInTab
            In a tab of the same window.
    \value WebEngineView.NewViewInDialog
            In a Window without a tab bar, toolbar, or URL bar.
    \value WebEngineView.NewViewInBackgroundTab
            In a tab of the same window, without hiding the currently visible web engine view.

    \sa {WebEngineNewViewRequest::destination}{WebEngineNewViewRequest.destination}
*/

/*!
    \qmlproperty enumeration WebEngineView::FindFlags

    Describes the options available to the findText() function. The options
    can be OR-ed together from the following list:

    \value  WebEngineView.FindBackward
            Searches backwards instead of forwards.
    \value  WebEngineView.FindFlags FindCaseSensitively
            By default findText() works case insensitive. Specifying
            this option changes the behavior to a case sensitive find operation.

    \sa findText()
*/

/*!
    \qmlproperty enumeration WebEngineView::RenderProcessTerminationStatus
    \since QtWebEngine 1.2

    Describes the status with which the render process terminated:

    \value  WebEngineView.NormalTerminationStatus
            The render process terminated normally.
    \value  WebEngineView.AbnormalTerminationStatus
            The render process terminated with a non-zero exit status.
    \value  WebEngineView.CrashedTerminationStatus
            The render process crashed, for example because of a segmentation fault.
    \value  WebEngineView.KilledTerminationStatus
            The render process was killed, for example by \c SIGKILL or task manager kill.
*/

/*!
    \qmlproperty enumeration WebEngineView::WebAction
    \since QtWebEngine 1.2

    Describes the types of action that can be performed on a web page:

    \value  WebEngineView.NoWebAction
            No action is triggered.
    \value  WebEngineView.Back
            Navigate back in the history of navigated links.
    \value  WebEngineView.Forward
            Navigate forward in the history of navigated links.
    \value  WebEngineView.Stop
            Stop loading the current page.
    \value  WebEngineView.Reload
            Reload the current page.
    \value  WebEngineView.ReloadAndBypassCache
            Reload the current page, but do not use any local cache.
    \value  WebEngineView.Cut
            Cut the content currently selected into the clipboard.
    \value  WebEngineView.Copy
            Copy the content currently selected into the clipboard.
    \value  WebEngineView.Paste
            Paste content from the clipboard.
    \value  WebEngineView.Undo
            Undo the last editing action.
    \value  WebEngineView.Redo
            Redo the last editing action.
    \value  WebEngineView.SelectAll
            Select all content.
    \value  WebEngineView.PasteAndMatchStyle
            Paste content from the clipboard with current style.
    \value  WebEngineView.OpenLinkInThisWindow
            Open the current link in the current window. (Added in Qt 5.6)
    \value  WebEngineView.OpenLinkInNewWindow
            Open the current link in a new window. (Added in Qt 5.6)
    \value  WebEngineView.OpenLinkInNewTab
            Open the current link in a new tab. (Added in Qt 5.6)
    \value  WebEngineView.CopyLinkToClipboard
            Copy the current link to the clipboard. (Added in Qt 5.6)
    \value  WebEngineView.CopyImageToClipboard
            Copy the clicked image to the clipboard. (Added in Qt 5.6)
    \value  WebEngineView.CopyImageUrlToClipboard
            Copy the clicked image's URL to the clipboard. (Added in Qt 5.6)
    \value  WebEngineView.CopyMediaUrlToClipboard
            Copy the hovered audio or video's URL to the clipboard. (Added in Qt 5.6)
    \value  WebEngineView.ToggleMediaControls
            Toggle between showing and hiding the controls for the hovered audio or video element.
            (Added in Qt 5.6)
    \value  WebEngineView.ToggleMediaLoop
            Toggle whether the hovered audio or video should loop on completetion or not.
           (Added in Qt 5.6)
    \value  WebEngineView.ToggleMediaPlayPause
            Toggle the play/pause state of the hovered audio or video element. (Added in Qt 5.6)
    \value  WebEngineView.ToggleMediaMute
            Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
    \value  WebEngineView.DownloadLinkToDisk
            Download the current link to the disk. To implement download
            actions, connect to the QWebEngineProfile::downloadRequested signal.
            (Added in Qt 5.6)
    \value  WebEngineView.DownloadImageToDisk
            Download the highlighted image to the disk. (Added in Qt 5.6)
    \value  WebEngineView.DownloadMediaToDisk
            Download the hovered audio or video to the disk. (Added in Qt 5.6)
    \value  WebEngineView.InspectElement
            Trigger any attached Web Inspector to inspect the highlighed element.
           (Added in Qt 5.6)
    \value  WebEngineView.ExitFullScreen
            Exit the fullscreen mode. (Added in Qt 5.6)

    \omitvalue WebActionCount
*/

/*!
    \qmlproperty enumeration WebEngineView::Feature

    Describes the platform feature access categories that the user may be asked to grant or deny
    access to:

    \value  WebEngineView.Geolocation
            Location hardware or service.
    \value  WebEngineView.MediaAudioCapture
            Audio capture devices, such as microphones.
    \value  WebEngineView.MediaVideoCapture
            Video devices, such as cameras.
    \value  WebEngineView.MediaAudioVideoCapture
            Both audio and video capture devices.

    \sa featurePermissionRequested(), grantFeaturePermission()
*/

/*!
    \qmlproperty bool WebEngineView::activeFocusOnPress
    \since QtWebEngine 1.2

    Specifies whether the view should gain active focus when pressed.
    The default value is \c true.
*/

/*!
    \qmlproperty bool WebEngineView::backgroundColor
    \since QtWebEngine 1.2

    Changes the color of the WebEngineView's background, behind the document's
    body. Can be set to \c "transparent" or to a translucent color to see
    through the document or to match the web content in a hybrid app to prevent
    the white flashes that may appear during loading.

    The default value is white.
*/

/*!
    \qmltype WebEngineFullScreenRequest
    \instantiates QQuickWebEngineFullScreenRequest
    \inqmlmodule QtWebEngine
    \since QtWebEngine 1.1

    \brief A utility type for the WebEngineView::fullScreenRequested() signal.

    \sa WebEngineView::fullScreenRequested()
*/

/*!
    \qmlproperty bool WebEngineFullScreenRequest::toggleOn
    \since QtWebEngine 1.1
    \readonly

    Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise.

    \sa accept()
*/

/*!
    \qmlmethod void WebEngineFullScreenRequest::accept()
    \since QtWebEngine 1.1

    Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
    property to be equal to toggleOn.

    \qml
    ApplicationWindow {
        id: window
        WebEngineView {
            onFullScreenRequested: {
                if (request.toggleOn)
                    window.showFullScreen()
                else
                    window.showNormal()
                request.accept()
            }
        }
    }
    \endqml

    \sa toggleOn
*/
