Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 201048: Support running tests under LayoutTests/http/tests/local as local file, in or... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webpreferences.h" 5 #include "webkit/glue/webpreferences.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "webkit/api/public/WebKit.h" 8 #include "webkit/api/public/WebKit.h"
9 #include "webkit/api/public/WebSettings.h" 9 #include "webkit/api/public/WebSettings.h"
10 #include "webkit/api/public/WebString.h" 10 #include "webkit/api/public/WebString.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Safari uses the same default. It is unlikley an embedder would want to 57 // Safari uses the same default. It is unlikley an embedder would want to
58 // change this, since it would break existing rich text editors. 58 // change this, since it would break existing rich text editors.
59 settings->setEditableLinkBehaviorNeverLive(); 59 settings->setEditableLinkBehaviorNeverLive();
60 60
61 settings->setFontRenderingModeNormal(); 61 settings->setFontRenderingModeNormal();
62 settings->setJavaEnabled(java_enabled); 62 settings->setJavaEnabled(java_enabled);
63 63
64 // Turn this on to cause WebCore to paint the resize corner for us. 64 // Turn this on to cause WebCore to paint the resize corner for us.
65 settings->setShouldPaintCustomScrollbars(true); 65 settings->setShouldPaintCustomScrollbars(true);
66 66
67 // Mitigate attacks from local HTML files by not granting file:// URLs 67 // By default, allow_universal_access_from_file_urls is set to false and thus
68 // universal access. 68 // we mitigate attacks from local HTML files by not granting file:// URLs
69 settings->setAllowUniversalAccessFromFileURLs(false); 69 // universal access. Only test shell will enable this.
70 settings->setAllowUniversalAccessFromFileURLs(
71 allow_universal_access_from_file_urls);
70 72
71 // We prevent WebKit from checking if it needs to add a "text direction" 73 // We prevent WebKit from checking if it needs to add a "text direction"
72 // submenu to a context menu. it is not only because we don't need the result 74 // submenu to a context menu. it is not only because we don't need the result
73 // but also because it cause a possible crash in Editor::hasBidiSelection(). 75 // but also because it cause a possible crash in Editor::hasBidiSelection().
74 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); 76 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
75 77
76 // Web inspector settings need to be passed in differently. 78 // Web inspector settings need to be passed in differently.
77 web_view->SetInspectorSettings(inspector_settings); 79 web_view->SetInspectorSettings(inspector_settings);
78 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698