|
Lines 38-43
a/WebCore/rendering/RenderThemeChromiumWin.cpp_sec1
|
| 38 |
#include "HTMLNames.h" |
38 |
#include "HTMLNames.h" |
| 39 |
#include "MediaControlElements.h" |
39 |
#include "MediaControlElements.h" |
| 40 |
#include "RenderBox.h" |
40 |
#include "RenderBox.h" |
|
|
41 |
#include "RenderProgress.h" |
| 41 |
#include "RenderSlider.h" |
42 |
#include "RenderSlider.h" |
| 42 |
#include "ScrollbarTheme.h" |
43 |
#include "ScrollbarTheme.h" |
| 43 |
#include "TransparencyWin.h" |
44 |
#include "TransparencyWin.h" |
|
Lines 653-656
bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
a/WebCore/rendering/RenderThemeChromiumWin.cpp_sec2
|
| 653 |
return false; |
654 |
return false; |
| 654 |
} |
655 |
} |
| 655 |
|
656 |
|
|
|
657 |
#if ENABLE(PROGRESS_TAG) |
| 658 |
|
| 659 |
static const double progressAnimationFrameRate = 0.033; |
| 660 |
static const double progressAnimationNumFrames = 60; |
| 661 |
|
| 662 |
double RenderThemeChromiumWin::animationRepeatIntervalForProgressBar(RenderProgress*) const |
| 663 |
{ |
| 664 |
return progressAnimationFrameRate; |
| 665 |
} |
| 666 |
|
| 667 |
double RenderThemeChromiumWin::animationDurationForProgressBar(RenderProgress* o) const |
| 668 |
{ |
| 669 |
if (o->position() < 0) |
| 670 |
return progressAnimationNumFrames * progressAnimationFrameRate; |
| 671 |
return 0.0; |
| 672 |
} |
| 673 |
|
| 674 |
void RenderThemeChromiumWin::adjustProgressBarStyle(CSSStyleSelector*, RenderStyle*, Element*) const |
| 675 |
{ |
| 676 |
} |
| 677 |
|
| 678 |
bool RenderThemeChromiumWin::paintProgressBar(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) |
| 679 |
{ |
| 680 |
RenderProgress* renderProgress = toRenderProgress(o); |
| 681 |
|
| 682 |
int fillPart; |
| 683 |
IntRect fillRect; |
| 684 |
if (renderProgress->position() < 0) { |
| 685 |
double p = renderProgress->animationProgress(); |
| 686 |
int width = r.width() / 2; |
| 687 |
int dx = p > 0.5 ? r.width() * (1.0 - p) : r.width() * p; |
| 688 |
fillRect = IntRect(r.x() + dx, r.y(), width, r.height()); |
| 689 |
fillPart = PP_MOVEOVERLAY; |
| 690 |
} else { |
| 691 |
fillRect = IntRect(r.x(), r.y(), r.width() * renderProgress->position(), r.height()); |
| 692 |
fillPart = PP_FILL; |
| 693 |
} |
| 694 |
|
| 695 |
WebCore::ThemePainter painter(i.context, r); |
| 696 |
ChromiumBridge::paintProgressBar(painter.context(), |
| 697 |
PP_BAR, |
| 698 |
0, |
| 699 |
r, |
| 700 |
fillPart, |
| 701 |
0, |
| 702 |
fillRect); |
| 703 |
return true; |
| 704 |
} |
| 705 |
|
| 706 |
#endif |
| 707 |
|
| 656 |
} // namespace WebCore |
708 |
} // namespace WebCore |