| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 using namespace WebKit; | 48 using namespace WebKit; |
| 49 using namespace std; | 49 using namespace std; |
| 50 | 50 |
| 51 namespace WebTestRunner { | 51 namespace WebTestRunner { |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 const SkColor edgeColor = SK_ColorBLACK; | 55 const SkColor edgeColor = SK_ColorBLACK; |
| 56 const SkColor readOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6); | 56 const SkColor readOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6); |
| 57 const SkColor fgColor = SK_ColorBLACK; | 57 const SkColor fgColor = SK_ColorBLACK; |
| 58 |
| 59 // These are indexed by WebTestThemeControlWin::State, *not* WebThemeEngine::Sta
te. |
| 58 const SkColor bgColors[] = { | 60 const SkColor bgColors[] = { |
| 59 SK_ColorBLACK, // Unknown | 61 SK_ColorBLACK, // Unknown (not used) |
| 60 SkColorSetRGB(0xc9, 0xc9, 0xc9), // Disabled | 62 SkColorSetRGB(0xc9, 0xc9, 0xc9), // Disabled |
| 61 SkColorSetRGB(0xf3, 0xe0, 0xd0), // Readonly | 63 SkColorSetRGB(0xf3, 0xe0, 0xd0), // Readonly |
| 62 SkColorSetRGB(0x89, 0xc4, 0xff), // Normal | 64 SkColorSetRGB(0x89, 0xc4, 0xff), // Normal |
| 63 SkColorSetRGB(0x43, 0xf9, 0xff), // Hot | 65 SkColorSetRGB(0x43, 0xf9, 0xff), // Hot |
| 64 SkColorSetRGB(0x20, 0xf6, 0xcc), // Focused | 66 SkColorSetRGB(0x20, 0xf6, 0xcc), // Hover |
| 65 SkColorSetRGB(0x00, 0xf3, 0xac), // Hover | 67 SkColorSetRGB(0x00, 0xf3, 0xac), // Focused |
| 66 SkColorSetRGB(0xa9, 0xff, 0x12), // Pressed | 68 SkColorSetRGB(0xa9, 0xff, 0x12), // Pressed |
| 67 SkColorSetRGB(0xcc, 0xcc, 0xcc) // Indeterminate | 69 SkColorSetRGB(0xcc, 0xcc, 0xcc) // Indeterminate (not used) |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 SkIRect validate(const SkIRect& rect, WebTestThemeControlWin::Type ctype) | 72 SkIRect validate(const SkIRect& rect, WebTestThemeControlWin::Type ctype) |
| 71 { | 73 { |
| 72 switch (ctype) { | 74 switch (ctype) { |
| 73 case WebTestThemeControlWin::UncheckedBoxType: | 75 case WebTestThemeControlWin::UncheckedBoxType: |
| 74 case WebTestThemeControlWin::CheckedBoxType: | 76 case WebTestThemeControlWin::CheckedBoxType: |
| 75 case WebTestThemeControlWin::UncheckedRadioType: | 77 case WebTestThemeControlWin::UncheckedRadioType: |
| 76 case WebTestThemeControlWin::CheckedRadioType: { | 78 case WebTestThemeControlWin::CheckedRadioType: { |
| 77 SkIRect retval = rect; | 79 SkIRect retval = rect; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 SkIRect tofill; | 483 SkIRect tofill; |
| 482 tofill.intersect(m_irect, fillRect); | 484 tofill.intersect(m_irect, fillRect); |
| 483 paint.setColor(m_fgColor); | 485 paint.setColor(m_fgColor); |
| 484 paint.setStyle(SkPaint::kFill_Style); | 486 paint.setStyle(SkPaint::kFill_Style); |
| 485 m_canvas->drawIRect(tofill, paint); | 487 m_canvas->drawIRect(tofill, paint); |
| 486 | 488 |
| 487 markState(); | 489 markState(); |
| 488 } | 490 } |
| 489 | 491 |
| 490 } | 492 } |
| OLD | NEW |