bool RenderTheme::paintDecorations(RenderObject* o, const RenderObject::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: return paintMenuListButton(o, paintInfo, r); case TextFieldPart: case TextAreaPart: case ListboxPart: case CheckboxPart: case RadioPart: case PushButtonPart: case SquareButtonPart: case ListButtonPart: case DefaultButtonPart: case ButtonPart: case MenulistPart: case SliderHorizontalPart: case SliderVerticalPart: case SliderThumbHorizontalPart: case SliderThumbVerticalPart: case SearchFieldPart: case SearchFieldCancelButtonPart: case SearchFieldDecorationPart: case SearchFieldResultsDecorationPart: case SearchFieldResultsButtonPart: default: break; } return false; }
bool RenderThemeWin::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { // FIXME: All these inflate() calls are bogus, causing painting problems, // as well as sizing wackiness in Classic mode IntRect editRect(r); paintTextField(o, i, editRect); const int buttonWidth = GetSystemMetrics(SM_CXVSCROLL); IntRect buttonRect(r.right() - buttonWidth - 1, r.y(), buttonWidth, r.height()); buttonRect.inflateY(-1); paintMenuListButton(o, i, buttonRect); return false; }
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: return paintMenuListButton(o, paintInfo, r); case TextFieldPart: case TextAreaPart: case ListboxPart: case CheckboxPart: case RadioPart: case PushButtonPart: case SquareButtonPart: case ListButtonPart: case DefaultButtonPart: case ButtonPart: case MenulistPart: #if ENABLE(METER_TAG) case MeterPart: case RelevancyLevelIndicatorPart: case ContinuousCapacityLevelIndicatorPart: case DiscreteCapacityLevelIndicatorPart: case RatingLevelIndicatorPart: #endif #if ENABLE(PROGRESS_TAG) case ProgressBarPart: #endif case SliderHorizontalPart: case SliderVerticalPart: case SliderThumbHorizontalPart: case SliderThumbVerticalPart: case SearchFieldPart: case SearchFieldCancelButtonPart: case SearchFieldDecorationPart: case SearchFieldResultsDecorationPart: case SearchFieldResultsButtonPart: #if ENABLE(INPUT_SPEECH) case InputSpeechButtonPart: #endif default: break; } return false; }
// Used to paint unstyled menulists (i.e. with the default border) bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r) { if (!o->isBox()) return false; const RenderBox* box = toRenderBox(o); int borderRight = box->borderRight(); int borderLeft = box->borderLeft(); int borderTop = box->borderTop(); int borderBottom = box->borderBottom(); // If all the borders are 0, then tell skia not to paint the border on the // textfield. FIXME: http://b/1210017 Figure out how to get Windows to not // draw individual borders and then pass that to skia so we can avoid // drawing any borders that are set to 0. For non-zero borders, we draw the // border, but webkit just draws over it. bool drawEdges = !(!borderRight && !borderLeft && !borderTop && !borderBottom); paintTextFieldInternal(o, i, r, drawEdges); return paintMenuListButton(o, i, r); }
bool RenderThemeWinCE::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r) { paintTextField(o, i, r); paintMenuListButton(o, i, r); return true; }