# Tweaks for the doc module

TWEAK_DOC_PRIMARY_MEDIUM                        rune

        Use DOC_PRIMARY_MEDIUM as css canvas media type in normal rendering mode
        (LAYOUT_NORMAL) if a document includes stylesheets with
        @media DOC_PRIMARY_MEDIUM, @import "..." DOC_PRIMARY_MEDIUM, or
        link/style elements with media="DOC_PRIMARY_MEDIUM".

        This tweak was originally requested by the Hokkaido project because
        they wanted to use normal rendering mode, but use "tv" as media type
        if present in stylesheets. Be aware that this tweak will discard all
        "screen" css for documents who mention "<DOC_PRIMARY_MEDIUM>".

        The media type is specified using the enum values from CSS_MediaType
        in modules/style/css_media.h. So for using handheld as primary medium,
        use CSS_MEDIA_TYPE_HANDHELD as the value for this tweak.

        Category        : setting
        Define          : DOC_PRIMARY_MEDIUM
        Depends on      : nothing
        Value           : CSS_MEDIA_TYPE_NONE
        Disabled for    : desktop, smartphone, minimal, mini, tv

TWEAK_DOC_HIGHLIGHT_CLICKED_LINK                stighal

        This is used to indicate that a link has been clicked.  Useful
        for penbased devices using a stylus where the loading is slow to
        indicate to the user that you actually have clicked something.

        Category        : setting
        Define          : HIGHLIGHT_CLICKED_LINK
        Depends on      : nothing
        Disabled for    : desktop, tv, smartphone, minimal, mini

TWEAK_DOC_MINIMUM_UNUSED_INLINES                jl

        When inlines stop being used in a document, we keep a record of
        having used them, to behave correctly if the inline becomes used
        again.  But to avoid possibly using infinite amounts of memory,
        we restrict the number of unused inlines stored to one per used
        inline.  To avoid being overly aggressive in a document with
        very few inlines, there is the minimum number set by this tweak:
        at least this many unused inlines are allowed regardless of the
        number of used inlines.

        The effect of an unused inline being removed is that when the
        same inline URL becomes used again, it may be reloaded depending
        on cache policies.  As long as a record of the unused inline is
        kept it will never be reloaded when it becomes used again as
        long as it is still in the URL cache.  Ultimately, the effect of
        not keeping track of previously used inline URLs can be delayed
        and/or flickering "mouse over" image swapping effects.

        Records of unused inlines do not lock URL data in the cache
        (like used inlines do) so the possible effect on memory use by
        this setting is rather limited (~60 bytes per unused inline on a
        32-bit system.)

        Category        : memory
        Define          : DOC_MINIMUM_UNUSED_INLINES
        Value           : 10
        Depends on      : nothing
        Disabled for    : desktop, tv, smartphone, minimal, mini

TWEAK_DOC_ACCESS_KEYS_MODE_PERSISTS             chrille

        When enabled, access key mode will persist even after it is used.
        When disabled, access key mode is disabled each time an access key is
        used.

        Category    : setting
        Define      : ACCESS_KEYS_MODE_PERSISTS
        Depends on  : ACCESS_KEYS_SUPPORT
        Enabled for : tv
        Disabled for: desktop, smartphone, minimal, mini

TWEAK_DOC_SPOTLIGHT_MARGIN					stighal

        This is the margin before a spotlighted element when scrolling
        to it.

        Category    : setting
        Define      : SPOTLIGHT_MARGIN
        Value       : 10
        Value for desktop: 20
        Disabled for: tv, smartphone, minimal, mini

TWEAK_DOC_ZOOMABLE_STANDALONE_PLUGINS                mg

        If enabled, standalone plugins, i.e. plugins loaded directly
        to the window, will use the full window width. In combination
        with adaptive zoom this means that the user can zoom in and
        out on the plugin.
        If disabled, the standalone plugins are embedded in a document
        with a viewport meta-tag which sets the width to the
        device-width. In combination with adaptive zoom this means
        that the plugin only has the size of the visual viewport and
        therefore the user cannot zoom in or out on the plugin.

        If adaptive zoom is not used, then this tweak does not change
        the behaviour, because without adaptive zoom, the viewport
        meta-tag is ignored.

        Disabling this tweak will consume less memory for standalone
        plugins.

        Category    : setting
        Define      : ZOOMABLE_STANDALONE_PLUGINS
        Enabled for : tv, desktop
        Disabled for: smartphone, minimal, mini

TWEAK_DOC_FLEXIBLE_IMAGE_POLICY                                bratell

        With this enabled, the image loading/showing settings will be
        ignored when the user load an image in the top document so that
        it will always be loaded/shown.

        Category    : setting
        Define      : FLEXIBLE_IMAGE_POLICY
        Enabled for : desktop, tv, smartphone, minimal
        Disabled for: mini

TWEAK_WEBFEEDS_AUTO_DISPLAY                                        mostynb

        Enables automatic display of webfeeds through a HTML page for displaying
        all feeds, and selecting individual entries.

        Category    : setting
        Define      : WEBFEEDS_AUTO_DISPLAY_SUPPORT
        Depends on  : FEATURE_WEBFEEDS_DISPLAY, FEATURE_WEBFEEDS_BACKEND, FEATURE_RSS
        Enabled for : none
        Disabled for: desktop, tv, smartphone, minimal, mini

TWEAK_DOC_DISABLE_SCROLL_TO_RECT	        markus

        This tweak disables FramesDocument::ScrollToRect().
        Used by Opera Mini to avoid the page being scrolled.

        Category    : setting
        Define      : DISABLE_SCROLL_TO_RECT
        Enabled for : mini
        Disabled for: desktop, tv, smartphone, minimal

TWEAK_DOC_SHIFTKEY_OPEN_IN_NEW_WINDOW                           adamm

        Sets the key that will open a link in a new window.  Possible
        values are SHIFTKEY_SHIFT, SHIFTKEY_CTRL or 0. 0 means that
        neither key should open a link in a new window.

        Category    : setting
        Define      : SHIFTKEY_OPEN_IN_NEW_WINDOW
        Depends on  :
        Value       : SHIFTKEY_SHIFT
        Disabled for: desktop, tv, smartphone, minimal, mini

TWEAK_DOC_SHIFTKEY_TOGGLE_OPEN_IN_BACKGROUND                     adamm

        Sets the key that toggle if a link that is to be opened in a
        new window opens in the foreground or background. Possible
        values are SHIFTKEY_SHIFT, SHIFTKEY_CTRL or 0.

        Category    : setting
        Define      : SHIFTKEY_TOGGLE_OPEN_IN_BACKGROUND
        Depends on  :
        Value       : SHIFTKEY_CTRL
        Disabled for: desktop, tv, smartphone, minimal, mini

TWEAK_DOC_SHIFTKEY_PREVENT_OPEN_IN_BACKGROUND                     rchlodnicki

        Sets the key that should prevent link from opening in background
        even if SHIFTKEY_TOGGLE_OPEN_IN_BACKGROUND was pressed.
        Used for cases where one button is meant to open in background
        but shouldn't do that when pressed together with another button.
        Possible values are SHIFTKEY_SHIFT, SHIFTKEY_CTRL or 0.
        0 means that no button can override one defined by
        SHIFTKEY_TOGGLE_OPEN_IN_BACKGROUND.

        Category    : setting
        Define      : SHIFTKEY_PREVENT_OPEN_IN_BACKGROUND
        Value       : 0
        Disabled for: desktop, tv, smartphone, minimal, mini

TWEAK_DOC_DOCEDIT_KEEP_HISTORY_DISTANCE                     pstanek

        Determines how far from the current document a document with a document edit must be in the history
        to be freed (causing user changes will be lost).
        This setting will cause that document edit will be kept in cache even when the cache is full or overloaded until 
        it's not far away enough in the history.

        Category                   : setting
        Define                     : DOC_DOCEDIT_KEEP_HISTORY_DISTANCE
        Depends on                 : FEATURE_EDITABLE_DOCUMENT
        Value                      : 3
        Value for desktop          : 10
        Value for tv               : 5
        Value for smartphone       : 3
        Value for minimal          : 2

TWEAK_DOC_SHOW_SPATIAL_NAVIGATION_IN_FORM               jl

        When enabled spatial navigation highlight will be shown whenever
        a form element is focused. Without this tweak, spatnav highlight
        is shown only when actually performing spatial navigation.

        Category    : setting
        Define      : DOC_SHOW_SPATIAL_NAVIGATION_IN_FORM
        Depends on  :
        Enabled for : none
        Disabled for: desktop, tv, smartphone, minimal, mini

TWEAK_DOC_RETURN_TOUCH_EVENT_TO_SENDER						terjes

        With this setting enabled, touch events transmitted by the platform
        will after processing be returned with a flag stating whether or not
        the receiving document processed the event and whether or not it
        wishes UI handling of the event to be suppressed.

        This tweak also allows platforms to tell Core whether or not to
        generate mouse events on a per-event basis. See the related tweak
        TWEAK_DOC_TOUCH_SMARTPHONE_COMPATIBILITY for the two approaches
        built in. Any deviation from those approaches requires this tweak.

        Category:     setting
        Define:       DOC_RETURN_TOUCH_EVENT_TO_SENDER
        Depends on:   FEATURE_TOUCH_EVENTS
        Enabled for:  smartphone
        Disabled for: desktop, tv, minimal

TWEAK_DOC_TOUCH_SMARTPHONE_COMPATIBILITY					terjes

        When unset, touch events that are not explicitly prevented by the
        document will be mapped directly to mouse events, providing support
        for drag and other mouse based interfaces.

        When set, touch events will generate mouse events in a manner much
        more similar to competing smartphone browsers. As long as a document
        handles a touch event, touch movements that are not taps will not
        cause mouse events to be generated. In addition, mouse events will
        only be generated after a touch has left the contact surface.

        See also TWEAK_DOC_RETURN_TOUCH_EVENT_TO_SENDER for more flexible
        mouse event generation.

        Category:     setting
        Define:       DOC_TOUCH_SMARTPHONE_COMPATIBILITY
        Depends on:   FEATURE_TOUCH_EVENTS
        Enabled for:  smartphone
        Disabled for: desktop, tv, minimal

TWEAK_DOC_CSS_BATCHING_INTERVAL                                deprecated

        Determines how often, in milliseconds, we apply stylesheets.
        This tweak was dropped and it's no longer in use.

TWEAK_DOC_REFRESH_DELAY_OVERRIDE   jwisniowski

        Allows the platform to override the meta refresh delay.

        Category    : setting
        Define      : REFRESH_DELAY_OVERRIDE
        Enabled for : mini
        Disabled for: desktop, tv, smartphone, minimal

TWEAK_DOC_SEND_POIMOVED										christiank

        With this tweak enabled, core will emit
        OpViewportRequestListener::OnPOIMoved instead of
        OpViewportRequestListener::OnVisualViewportEdgeChangeRequest,
        when an element under a point of interest is moved during a
        reflow.

        Category    : setting
        Define      : DOC_SEND_POIMOVED
        Depends on  :
        Enabled for : smartphone
        Disabled for: desktop, tv, minimal, mini

