Commit 60512b89 authored by rbyers@chromium.org's avatar rbyers@chromium.org

Update webkit_resources to support high-dpi assets

Move webkit_resource.grd to be in the same directory as all the resources.
This is consistent with what we do elsewhere, and avoids a limitation of the
new grit support for chrome_scaled_image (it expects 'context' to be a specific
form).

Move all the current images into a default_100_percent sub-directory.
Images were added to their new location separately (due to try/cq limitations 
on binary files) here: http://src.chromium.org/viewvc/chrome?view=rev&revision=148389

Add support for the 2x text area resize corner image.

Note that I didn't make the .cur files support multiple resolutions because
.cur files themselves can contain multiple resolutions, and when we support
high-DPI on windows (the only place these are used), we'll probably want to
use multi-resolution .cur files so that the cursor seamlessly changes when 
moving between different density screens.

Also fixes the addition of 'hand' cursors to be windows specific (as all the other 
cursors are now).

TBR=sky@chromium.org
BUG=134046
TEST=

Review URL: https://chromiumcodereview.appspot.com/10701105

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149290 0039d316-1c4b-4281-b951-d872f2087c98
parent f1998c7f
......@@ -534,6 +534,7 @@
'mac_bundle_resources': [
'<(grit_out_dir)/theme_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
],
}],
], # conditions
......
......@@ -249,6 +249,7 @@
'files': [
'<(grit_out_dir)/theme_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
],
},
],
......
......@@ -35,6 +35,7 @@ default_apps\external_extensions.json: %(VersionDir)s\default_apps\
[HIDPI]
theme_resources_200_percent.pak: %(VersionDir)s\
ui_resources_200_percent.pak: %(VersionDir)s\
webkit_resources_200_percent.pak: %(VersionDir)s\
[TOUCH]
theme_resources_touch_100_percent.pak: %(VersionDir)s\
......
......@@ -378,6 +378,12 @@ FILES = [
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'webkit_resources_200_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'wow_helper.exe',
'arch': ['32bit', '64bit'],
......
......@@ -797,6 +797,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
#endif // GOOGLE_CHROME_BUILD
switches::kInProcessWebGL,
switches::kJavaScriptFlags,
switches::kLoad2xResources,
switches::kLoggingLevel,
switches::kOldCheckboxStyle,
switches::kNoReferrers,
......
......@@ -33,6 +33,7 @@
#include "content/public/common/result_codes.h"
#include "sandbox/linux/suid/client/setuid_sandbox_client.h"
#include "sandbox/linux/suid/common/sandbox.h"
#include "ui/base/ui_base_switches.h"
#if defined(USE_TCMALLOC)
#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
......@@ -100,6 +101,10 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
switches::kRegisterPepperPlugins,
switches::kDisableSeccompSandbox,
switches::kEnableSeccompSandbox,
// Zygote process needs to know what resources to have loaded when it
// becomes a renderer process.
switches::kForceDeviceScaleFactor,
switches::kLoad2xResources,
};
cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches,
arraysize(kForwardSwitches));
......
......@@ -40,8 +40,9 @@
"net/base/net_resources.grd": {
"includes": [4000],
},
"webkit/glue/webkit_resources.grd": {
"webkit/glue/resources/webkit_resources.grd": {
"includes": [4500],
"structures": [4700],
},
"webkit/tools/test_shell/test_shell_resources.grd": {
"includes": [5000],
......
......@@ -52,12 +52,15 @@ void ResourceBundle::LoadCommonResources() {
SCALE_FACTOR_100P);
if (ShouldLoad2xResources()) {
// 2x touch
AddDataPackFromPath(
GetResourcesPakFilePath("theme_resources_touch_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_touch_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_touch_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"webkit_resources_200_percent.pak"),
SCALE_FACTOR_200P);
}
} else {
// 1x non touch
......@@ -75,6 +78,9 @@ void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"webkit_resources_200_percent.pak"),
SCALE_FACTOR_200P);
}
}
}
......
......@@ -55,6 +55,8 @@ void ResourceBundle::LoadCommonResources() {
nil), SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_100_percent",
nil), SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_100_percent",
nil), SCALE_FACTOR_100P);
// On Windows and ChromeOS we load either the 1x resource or the 2x resource.
// On Mac we load both and let the UI framework decide which one to use.
......@@ -64,6 +66,8 @@ void ResourceBundle::LoadCommonResources() {
nil), SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_200_percent",
nil), SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_200_percent",
nil), SCALE_FACTOR_200P);
}
#endif
}
......
......@@ -63,6 +63,9 @@ void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"webkit_resources_200_percent.pak"),
SCALE_FACTOR_200P);
} else {
AddDataPackFromPath(
GetResourcesPakFilePath("theme_resources_100_percent.pak"),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment