| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/shell/renderer/test_runner/mock_web_theme_engine.h" | 5 #include "content/shell/renderer/test_runner/mock_web_theme_engine.h" |
| 6 | 6 |
| 7 #if !defined(OS_MACOSX) | 7 #if !defined(OS_MACOSX) |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "skia/ext/platform_canvas.h" | 10 #include "skia/ext/platform_canvas.h" |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 SkIRect tofill = irect; | 621 SkIRect tofill = irect; |
| 622 if (extraParams->progressBar.determinate) { | 622 if (extraParams->progressBar.determinate) { |
| 623 tofill.set(extraParams->progressBar.valueRectX, | 623 tofill.set(extraParams->progressBar.valueRectX, |
| 624 extraParams->progressBar.valueRectY, | 624 extraParams->progressBar.valueRectY, |
| 625 extraParams->progressBar.valueRectX + | 625 extraParams->progressBar.valueRectX + |
| 626 extraParams->progressBar.valueRectWidth - 1, | 626 extraParams->progressBar.valueRectWidth - 1, |
| 627 extraParams->progressBar.valueRectY + | 627 extraParams->progressBar.valueRectY + |
| 628 extraParams->progressBar.valueRectHeight); | 628 extraParams->progressBar.valueRectHeight); |
| 629 } | 629 } |
| 630 | 630 |
| 631 tofill.intersect(irect, tofill); | 631 if (!tofill.intersect(irect)) { |
| 632 tofill.setEmpty(); |
| 633 } |
| 632 paint.setColor(edgeColor); | 634 paint.setColor(edgeColor); |
| 633 paint.setStyle(SkPaint::kFill_Style); | 635 paint.setStyle(SkPaint::kFill_Style); |
| 634 canvas->drawIRect(tofill, paint); | 636 canvas->drawIRect(tofill, paint); |
| 635 | 637 |
| 636 markState(canvas, irect, state); | 638 markState(canvas, irect, state); |
| 637 break; | 639 break; |
| 638 } | 640 } |
| 639 default: | 641 default: |
| 640 // FIXME: Should we do something here to indicate that we got an invalid
part? | 642 // FIXME: Should we do something here to indicate that we got an invalid
part? |
| 641 // Unfortunately, we can't assert because we don't have access to WTF or
base. | 643 // Unfortunately, we can't assert because we don't have access to WTF or
base. |
| 642 break; | 644 break; |
| 643 } | 645 } |
| 644 } | 646 } |
| 645 | 647 |
| 646 } // namespace content | 648 } // namespace content |
| 647 | 649 |
| 648 #endif // !defined(OS_MACOSX) | 650 #endif // !defined(OS_MACOSX) |
| OLD | NEW |