diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-13 21:28:26 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-13 21:28:26 +0000 |
commit | a831389d445026011241830339660fbbb1af51ec (patch) | |
tree | 01a257fe8240e259d71794173e17966a55aa9fd3 /webkit | |
parent | 2217cd710ebcd6551bf01e2cdb558073e0c18cbf (diff) | |
download | chromium_src-a831389d445026011241830339660fbbb1af51ec.zip chromium_src-a831389d445026011241830339660fbbb1af51ec.tar.gz chromium_src-a831389d445026011241830339660fbbb1af51ec.tar.bz2 |
Remove grit hack and inline a 30x30 red square for a
data resource that we were loading from disk. This should
get compiled out in chrome. Rebaseline one test.
Review URL: http://codereview.chromium.org/18008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rwxr-xr-x | webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum | 2 | ||||
-rwxr-xr-x | webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png | bin | 13583 -> 11360 bytes | |||
-rw-r--r-- | webkit/glue/chromium_bridge_impl.cc | 22 | ||||
-rwxr-xr-x | webkit/glue/webkit_resources.grd | 4 | ||||
-rwxr-xr-x | webkit/tools/test_shell/resources/deleteButton.png | bin | 2231 -> 0 bytes | |||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 14 |
6 files changed, 19 insertions, 23 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum index 0d0d8b4..b50ebc5 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum @@ -1 +1 @@ -1e334d930adc7be29441349b86422bcc
\ No newline at end of file +91a40e384a8174dc06866dd8e586c911
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png Binary files differindex cd6997e..919f163 100755 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc index 48d2485..680ae9e 100644 --- a/webkit/glue/chromium_bridge_impl.cc +++ b/webkit/glue/chromium_bridge_impl.cc @@ -397,10 +397,24 @@ PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) { resource_id = IDR_PAN_SCROLL_ICON; } else if (!strcmp(name, "deleteButton")) { if (webkit_glue::IsLayoutTestMode()) { - resource_id = IDR_EDITOR_DELETE_BUTTON; - } else { - NOTREACHED() << "editor deletion UI should be disabled"; - return Image::nullImage(); + RefPtr<Image> image = BitmapImage::create(); + // Create a red 30x30 square used only in layout tests. + const char red_square[] = + "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" + "\x00\x00\x00\x1e\x00\x00\x00\x1e\x04\x03\x00\x00\x00\xc9\x1e\xb3" + "\x91\x00\x00\x00\x30\x50\x4c\x54\x45\x00\x00\x00\x80\x00\x00\x00" + "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80" + "\x80\xc0\xc0\xc0\xff\x00\x00\x00\xff\x00\xff\xff\x00\x00\x00\xff" + "\xff\x00\xff\x00\xff\xff\xff\xff\xff\x7b\x1f\xb1\xc4\x00\x00\x00" + "\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\x00\x9a" + "\x9c\x18\x00\x00\x00\x17\x49\x44\x41\x54\x78\x01\x63\x98\x89\x0a" + "\x18\x50\xb9\x33\x47\xf9\xa8\x01\x32\xd4\xc2\x03\x00\x33\x84\x0d" + "\x02\x3a\x91\xeb\xa5\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60" + "\x82"; + const int size = arraysize(red_square); + RefPtr<SharedBuffer> buffer = SharedBuffer::create(red_square, size); + image->setData(buffer, true); + return image; } } else { NOTREACHED() << "Unknown image resource " << name; diff --git a/webkit/glue/webkit_resources.grd b/webkit/glue/webkit_resources.grd index 79c64f9c..57a2049 100755 --- a/webkit/glue/webkit_resources.grd +++ b/webkit/glue/webkit_resources.grd @@ -14,10 +14,6 @@ <include name="IDR_PAN_SCROLL_ICON" file="resources\pan_icon.png" type="BINDATA" />
<include name="IDR_TEXTAREA_RESIZER" file="resources\textarea_resize_corner.png" type="BINDATA" />
- <!-- The editor delete button is only used in layout tests so the
- actual resource isn't in webkit_resources.rc. This resource
- should not be used outside of layout tests. -->
- <include name="IDR_EDITOR_DELETE_BUTTON" headeronly="true" file="" type="BINDATA" />
<include name="IDC_ALIAS" file="resources\aliasb.cur" type="CURSOR" />
<include name="IDC_CELL" file="resources\cell.cur" type="CURSOR" />
<include name="IDC_COLRESIZE" file="resources\col_resize.cur" type="CURSOR" />
diff --git a/webkit/tools/test_shell/resources/deleteButton.png b/webkit/tools/test_shell/resources/deleteButton.png Binary files differdeleted file mode 100755 index 8f1b881..0000000 --- a/webkit/tools/test_shell/resources/deleteButton.png +++ /dev/null diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index f7c4697..48c24bfb 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -536,20 +536,6 @@ std::string GetDataResource(int resource_id) { // that computes feed previews in feed_preview.cc:MakeFeedPreview. // This fixes issue #932714. return std::string("Feed preview for {{URL}}"); - case IDR_EDITOR_DELETE_BUTTON: { - // Use webkit's delete button image. - static std::string delete_button_data; - if (delete_button_data.empty()) { - FilePath path = GetResourcesFilePath(); - path = path.Append(FILE_PATH_LITERAL("deleteButton.png")); - bool success = file_util::ReadFileToString(path.ToWStringHack(), - &delete_button_data); - if (!success) { - LOG(FATAL) << "Failed reading: " << path.value(); - } - } - return delete_button_data; - } case IDR_TEXTAREA_RESIZER: { // Use webkit's text area resizer image. static std::string resize_corner_data; |