| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file implements a simple generic version of the WebKitThemeEngine, | 5 // This file implements a simple generic version of the WebKitThemeEngine, |
| 6 // which is used to draw all the native controls on a web page. We use this | 6 // which is used to draw all the native controls on a web page. We use this |
| 7 // file when running in layout test mode in order to remove any | 7 // file when running in layout test mode in order to remove any |
| 8 // platform-specific rendering differences due to themes, colors, etc. | 8 // platform-specific rendering differences due to themes, colors, etc. |
| 9 // | 9 // |
| 10 | 10 |
| 11 #include "webkit/tools/test_shell/test_shell_webthemecontrol.h" | 11 #include "webkit/tools/test_shell/test_shell_webthemecontrol.h" |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "skia/ext/platform_canvas.h" | |
| 15 #include "skia/ext/skia_utils_win.h" | 14 #include "skia/ext/skia_utils_win.h" |
| 15 #include "third_party/skia/include/core/SkCanvas.h" |
| 16 #include "third_party/skia/include/core/SkPaint.h" | 16 #include "third_party/skia/include/core/SkPaint.h" |
| 17 #include "third_party/skia/include/core/SkPath.h" | 17 #include "third_party/skia/include/core/SkPath.h" |
| 18 | 18 |
| 19 namespace TestShellWebTheme { | 19 namespace TestShellWebTheme { |
| 20 | 20 |
| 21 const SkColor kEdgeColor = SK_ColorBLACK; | 21 const SkColor kEdgeColor = SK_ColorBLACK; |
| 22 const SkColor kReadOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6); | 22 const SkColor kReadOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6); |
| 23 const SkColor kFgColor = SK_ColorBLACK; | 23 const SkColor kFgColor = SK_ColorBLACK; |
| 24 | 24 |
| 25 const SkColor kBgColors[] = { | 25 const SkColor kBgColors[] = { |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 SkIRect tofill; | 428 SkIRect tofill; |
| 429 tofill.intersect(irect_, fill_rect); | 429 tofill.intersect(irect_, fill_rect); |
| 430 paint.setColor(fg_color_); | 430 paint.setColor(fg_color_); |
| 431 paint.setStyle(SkPaint::kFill_Style); | 431 paint.setStyle(SkPaint::kFill_Style); |
| 432 canvas_->drawIRect(tofill, paint); | 432 canvas_->drawIRect(tofill, paint); |
| 433 | 433 |
| 434 markState(); | 434 markState(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 } // namespace TestShellWebTheme | 437 } // namespace TestShellWebTheme |
| 438 | |
| OLD | NEW |