#include "public/platform/WebRect.h"
#include "wtf/text/StringBuilder.h"
-#if ENABLE(INPUT_SPEECH)
-#include "core/rendering/RenderInputSpeech.h"
-#endif
-
// The methods in this file are shared by all themes on every platform.
namespace WebCore {
return adjustSearchFieldDecorationStyle(style, e);
case SearchFieldResultsDecorationPart:
return adjustSearchFieldResultsDecorationStyle(style, e);
-#if ENABLE(INPUT_SPEECH)
- case InputSpeechButtonPart:
- return adjustInputFieldSpeechButtonStyle(style, e);
-#endif
default:
break;
}
o->repaint();
return false;
}
- if (paintInfo.context->paintingDisabled())
- return false;
-
ControlPart part = o->style()->appearance();
if (shouldUseFallbackTheme(o->style()))
return paintSearchFieldDecoration(o, paintInfo, r);
case SearchFieldResultsDecorationPart:
return paintSearchFieldResultsDecoration(o, paintInfo, r);
-#if ENABLE(INPUT_SPEECH)
- case InputSpeechButtonPart:
- return paintInputFieldSpeechButton(o, paintInfo, r);
-#endif
default:
break;
}
bool RenderTheme::paintBorderOnly(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- if (paintInfo.context->paintingDisabled())
- return false;
-
// Call the appropriate paint method based off the appearance value.
switch (o->style()->appearance()) {
case TextFieldPart:
case SearchFieldCancelButtonPart:
case SearchFieldDecorationPart:
case SearchFieldResultsDecorationPart:
-#if ENABLE(INPUT_SPEECH)
- case InputSpeechButtonPart:
-#endif
default:
break;
}
bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- if (paintInfo.context->paintingDisabled())
- return false;
-
// Call the appropriate paint method based off the appearance value.
switch (o->style()->appearance()) {
case MenulistButtonPart:
case SearchFieldCancelButtonPart:
case SearchFieldDecorationPart:
case SearchFieldResultsDecorationPart:
-#if ENABLE(INPUT_SPEECH)
- case InputSpeechButtonPart:
-#endif
default:
break;
}
node = node->focusDelegate();
Document& document = node->document();
LocalFrame* frame = document.frame();
- return node == document.focusedElement() && node->shouldHaveFocusAppearance() && frame && frame->selection().isFocusedAndActive();
+ return node == document.focusedElement() && node->focused() && node->shouldHaveFocusAppearance() && frame && frame->selection().isFocusedAndActive();
}
bool RenderTheme::isPressed(const RenderObject* o) const
{
}
-#if ENABLE(INPUT_SPEECH)
-void RenderTheme::adjustInputFieldSpeechButtonStyle(RenderStyle* style, Element* element) const
-{
- RenderInputSpeech::adjustInputFieldSpeechButtonStyle(style, element);
-}
-
-bool RenderTheme::paintInputFieldSpeechButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
-{
- return RenderInputSpeech::paintInputFieldSpeechButton(object, paintInfo, rect);
-}
-#endif
-
IntSize RenderTheme::meterSizeForBounds(const RenderMeter*, const IntRect& bounds) const
{
return bounds.size();
bool RenderTheme::paintCheckboxUsingFallbackTheme(RenderObject* o, const PaintInfo& i, const IntRect& r)
{
+ if (i.context->paintingDisabled())
+ return false;
blink::WebFallbackThemeEngine::ExtraParams extraParams;
blink::WebCanvas* canvas = i.context->canvas();
extraParams.button.checked = isChecked(o);
bool RenderTheme::paintRadioUsingFallbackTheme(RenderObject* o, const PaintInfo& i, const IntRect& r)
{
+ if (i.context->paintingDisabled())
+ return false;
blink::WebFallbackThemeEngine::ExtraParams extraParams;
blink::WebCanvas* canvas = i.context->canvas();
extraParams.button.checked = isChecked(o);