~midori/midori/trunk

« back to all changes in this revision

Viewing changes to midori/midori-websettings.c

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2013-06-19 21:00:46 UTC
  • mfrom: (6216.1.10 midori.butcher)
  • Revision ID: tarmac-20130619210046-i3yv8cnkyjuafubb
Bump WebKit requirement to 1.8.3 and drop support for earlier versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    gint clear_private_data;
61
61
    gchar* clear_data;
62
62
    gchar* site_data_rules;
63
 
    #if !WEBKIT_CHECK_VERSION (1, 3, 13)
64
 
    gboolean enable_dns_prefetching;
65
 
    #endif
66
63
    gboolean enforce_font_family;
67
64
    gchar* user_stylesheet_uri;
68
65
    gchar* user_stylesheet_uri_cached;
376
373
                                     TRUE,
377
374
                                     flags));
378
375
 
379
 
    #if WEBKIT_CHECK_VERSION (1, 1, 18)
380
376
    g_object_class_install_property (gobject_class,
381
377
                                     PROP_ENABLE_PAGE_CACHE,
382
378
                                     g_param_spec_boolean ("enable-page-cache",
384
380
                                                           "Whether the page cache should be used",
385
381
        !midori_web_settings_low_memory_profile (),
386
382
                                                           flags));
387
 
    #endif
 
383
 
388
384
    if (g_object_class_find_property (gobject_class, "enable-fullscreen"))
389
385
    g_object_class_install_property (gobject_class,
390
386
                                     PROP_ENABLE_FULLSCREEN,
478
474
        "Cookies, HTML5 databases, local storage and application cache blocking",
479
475
                                     NULL,
480
476
                                     flags));
481
 
    #if !WEBKIT_CHECK_VERSION (1, 3, 13)
482
 
    /**
483
 
     * MidoriWebSettings:enable-dns-prefetching:
484
 
     *
485
 
     * Whether to resolve host names in advance.
486
 
     *
487
 
     * Since: 0.3.4
488
 
     */
489
 
    g_object_class_install_property (gobject_class,
490
 
                                     PROP_ENABLE_DNS_PREFETCHING,
491
 
                                     g_param_spec_boolean (
492
 
                                     "enable-dns-prefetching",
493
 
        "Whether to resolve host names in advance",
494
 
        "Whether host names on a website or in bookmarks should be prefetched",
495
 
                                     TRUE,
496
 
                                     flags));
497
 
    #endif
498
477
 
499
478
    /**
500
479
     * MidoriWebSettings:enforc-font-family:
567
546
    web_settings->user_stylesheet_uri = web_settings->user_stylesheet_uri_cached = NULL;
568
547
    web_settings->user_stylesheets = NULL;
569
548
 
570
 
    #if WEBKIT_CHECK_VERSION (1, 2, 6) && !WEBKIT_CHECK_VERSION (1, 2, 8)
571
 
    /* Shadows are very slow with WebKitGTK+ 1.2.7 */
572
 
    midori_web_settings_add_style (web_settings, "box-shadow-workaround",
573
 
        "* { -webkit-box-shadow: none !important; }");
574
 
    #endif
575
 
 
576
 
    #if defined (_WIN32) && WEBKIT_CHECK_VERSION (1, 7, 1) && !GTK_CHECK_VERSION (3, 0, 0)
 
549
    #if defined (_WIN32) && !GTK_CHECK_VERSION (3, 0, 0)
577
550
    /* Try to work-around black borders on native widgets and GTK+2 on Win32 */
578
551
    midori_web_settings_add_style (web_settings, "black-widgets-workaround",
579
552
    "input[type='checkbox'] { -webkit-appearance: checkbox !important }"
617
590
gboolean
618
591
midori_web_settings_has_plugin_support (void)
619
592
{
620
 
    #if !WEBKIT_CHECK_VERSION (1, 8, 2) && defined G_OS_WIN32
621
 
    return FALSE;
622
 
    #else
623
593
    return !midori_debug ("unarmed")  && g_strcmp0 (g_getenv ("MOZ_PLUGIN_PATH"), "/");
624
 
    #endif
625
594
}
626
595
 
627
596
/**
798
767
    const int webcore_minor = 32;
799
768
    #endif
800
769
 
801
 
    #if WEBKIT_CHECK_VERSION (1, 1, 18)
802
770
    g_object_set (web_settings, "enable-site-specific-quirks",
803
771
        identify_as != MIDORI_IDENT_GENUINE, NULL);
804
 
    #endif
805
772
 
806
773
    switch (identify_as)
807
774
    {
1013
980
           WEB_SETTINGS_STRING ("enable-plugins"), g_value_get_boolean (value),
1014
981
        #if HAVE_WEBKIT2
1015
982
            "enable-java", g_value_get_boolean (value),
1016
 
        #elif WEBKIT_CHECK_VERSION (1, 1, 22)
 
983
        #else
1017
984
            "enable-java-applet", g_value_get_boolean (value),
1018
985
        #endif
1019
986
            NULL);
1020
987
        break;
1021
 
    #if WEBKIT_CHECK_VERSION (1, 1, 18)
1022
988
    case PROP_ENABLE_PAGE_CACHE:
1023
989
        g_object_set (web_settings, WEB_SETTINGS_STRING ("enable-page-cache"),
1024
990
                      g_value_get_boolean (value), NULL);
1025
991
        break;
1026
 
    #endif
1027
992
 
1028
993
    case PROP_PROXY_TYPE:
1029
994
        web_settings->proxy_type = g_value_get_enum (value);
1067
1032
    case PROP_SITE_DATA_RULES:
1068
1033
        katze_assign (web_settings->site_data_rules, g_value_dup_string (value));
1069
1034
        break;
1070
 
    #if !WEBKIT_CHECK_VERSION (1, 3, 13)
1071
 
    case PROP_ENABLE_DNS_PREFETCHING:
1072
 
        web_settings->enable_dns_prefetching = g_value_get_boolean (value);
1073
 
        break;
1074
 
    #endif
1075
1035
    case PROP_ENFORCE_FONT_FAMILY:
1076
1036
        if ((web_settings->enforce_font_family = g_value_get_boolean (value)))
1077
1037
        {
1189
1149
        g_value_set_boolean (value, katze_object_get_boolean (web_settings,
1190
1150
                             WEB_SETTINGS_STRING ("enable-plugins")));
1191
1151
        break;
1192
 
    #if WEBKIT_CHECK_VERSION (1, 1, 18)
1193
1152
    case PROP_ENABLE_PAGE_CACHE:
1194
1153
        g_value_set_boolean (value, katze_object_get_boolean (web_settings,
1195
1154
                             WEB_SETTINGS_STRING ("enable-page-cache")));
1196
1155
        break;
1197
 
    #endif
1198
1156
 
1199
1157
    case PROP_PROXY_TYPE:
1200
1158
        g_value_set_enum (value, web_settings->proxy_type);
1219
1177
    case PROP_SITE_DATA_RULES:
1220
1178
        g_value_set_string (value, web_settings->site_data_rules);
1221
1179
        break;
1222
 
    #if !WEBKIT_CHECK_VERSION (1, 3, 13)
1223
 
    case PROP_ENABLE_DNS_PREFETCHING:
1224
 
        g_value_set_boolean (value, web_settings->enable_dns_prefetching);
1225
 
        break;
1226
 
    #endif
1227
1180
    case PROP_ENFORCE_FONT_FAMILY:
1228
1181
        g_value_set_boolean (value, web_settings->enforce_font_family);
1229
1182
        break;