diff options
author | dglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 20:43:50 +0000 |
---|---|---|
committer | dglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 20:43:50 +0000 |
commit | 6e5d4215eb1b7e736d6e53d9283074acfaf3bf9c (patch) | |
tree | deebf83cadf46bf317edb6f4b091f951ce7ed92f | |
parent | 8395110bf6ef9bb74b27b7340561f0a96fc7b010 (diff) | |
download | chromium_src-6e5d4215eb1b7e736d6e53d9283074acfaf3bf9c.zip chromium_src-6e5d4215eb1b7e736d6e53d9283074acfaf3bf9c.tar.gz chromium_src-6e5d4215eb1b7e736d6e53d9283074acfaf3bf9c.tar.bz2 |
Plumb through site-specific quirks setting with a command line switch.
Quirks are enabled by default.
R=darin
BUG=19586
TEST=wikileaks.org should now have its sidebar in the proper place.
Review URL: http://codereview.chromium.org/442010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33107 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 2 | ||||
-rw-r--r-- | webkit/glue/webpreferences.cc | 1 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 1 |
7 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index b57175c..974a15f 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -185,6 +185,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( !command_line.HasSwitch(switches::kDisableDatabases); web_prefs.experimental_webgl_enabled = command_line.HasSwitch(switches::kEnableExperimentalWebGL); + web_prefs.site_specific_quirks_enabled = + !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); } web_prefs.uses_universal_detector = diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 13d76c1..f15b105 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -129,6 +129,9 @@ const char kDisablePromptOnRepost[] = "disable-prompt-on-repost"; // Enable shared workers. Functionality not yet complete. const char kDisableSharedWorkers[] = "disable-shared-workers"; +// Disable site-specific tailoring to compatibility issues in WebKit. +const char kDisableSiteSpecificQuirks[] = "disable-site-specific-quirks"; + // Disable syncing bookmarks to a Google Account. const char kDisableSync[] = "disable-sync"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 06c2581..f646d67 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -52,6 +52,7 @@ extern const char kDisablePlugins[]; extern const char kDisablePopupBlocking[]; extern const char kDisablePromptOnRepost[]; extern const char kDisableSharedWorkers[]; +extern const char kDisableSiteSpecificQuirks[]; extern const char kDisableSync[]; extern const char kDisableWebResources[]; extern const char kDisableWebSecurity[]; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index b6ccc67..f960d65 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1614,6 +1614,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.dom_paste_enabled); WriteParam(m, p.developer_extras_enabled); WriteParam(m, p.inspector_settings); + WriteParam(m, p.site_specific_quirks_enabled); WriteParam(m, p.shrinks_standalone_images_to_fit); WriteParam(m, p.uses_universal_detector); WriteParam(m, p.text_areas_are_resizable); @@ -1652,6 +1653,7 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->dom_paste_enabled) && ReadParam(m, iter, &p->developer_extras_enabled) && ReadParam(m, iter, &p->inspector_settings) && + ReadParam(m, iter, &p->site_specific_quirks_enabled) && ReadParam(m, iter, &p->shrinks_standalone_images_to_fit) && ReadParam(m, iter, &p->uses_universal_detector) && ReadParam(m, iter, &p->text_areas_are_resizable) && diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 77cbcfd..9c5780e 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -40,6 +40,7 @@ void WebPreferences::Apply(WebView* web_view) const { settings->setPluginsEnabled(plugins_enabled); settings->setDOMPasteAllowed(dom_paste_enabled); settings->setDeveloperExtrasEnabled(developer_extras_enabled); + settings->setNeedsSiteSpecificQuirks(site_specific_quirks_enabled); settings->setShrinksStandaloneImagesToFit(shrinks_standalone_images_to_fit); settings->setUsesEncodingDetector(uses_universal_detector); settings->setTextAreasAreResizable(text_areas_are_resizable); diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index 5d23cb6..34c5a3b 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -38,6 +38,7 @@ struct WebPreferences { bool dom_paste_enabled; bool developer_extras_enabled; std::string inspector_settings; + bool site_specific_quirks_enabled; bool shrinks_standalone_images_to_fit; bool uses_universal_detector; bool text_areas_are_resizable; @@ -82,6 +83,7 @@ struct WebPreferences { plugins_enabled(true), dom_paste_enabled(false), // enables execCommand("paste") developer_extras_enabled(false), // Requires extra work by embedder + site_specific_quirks_enabled(false), shrinks_standalone_images_to_fit(true), uses_universal_detector(false), // Disabled: page cycler regression text_areas_are_resizable(true), diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 30f34a6..74113d3 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -431,6 +431,7 @@ void TestShell::ResetWebPreferences() { web_prefs_->javascript_can_open_windows_automatically = true; web_prefs_->dom_paste_enabled = true; web_prefs_->developer_extras_enabled = !layout_test_mode_; + web_prefs_->site_specific_quirks_enabled = true; web_prefs_->shrinks_standalone_images_to_fit = false; web_prefs_->uses_universal_detector = false; web_prefs_->text_areas_are_resizable = false; |