Lines Matching full:style
59 void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e,
63 ControlPart part = style->appearance();
64 if (style->display() == INLINE || style->display() == INLINE_TABLE || style->display() == TABLE_ROW_GROUP ||
65 style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_FOOTER_GROUP ||
66 style->display() == TABLE_ROW || style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE_COLUMN ||
67 style->display() == TABLE_CELL || style->display() == TABLE_CAPTION)
68 style->setDisplay(INLINE_BLOCK);
69 else if (style->display() == COMPACT || style->display() == RUN_IN || style->display() == LIST_ITEM || style->display() == TABLE)
70 style->setDisplay(BLOCK);
72 if (UAHasAppearance && isControlStyled(style, border, background, backgroundColor)) {
74 style->setAppearance(MenulistButtonPart);
77 style->setAppearance(NoControlPart);
80 if (!style->hasAppearance())
84 style->setBoxShadow(0);
98 LengthBox borderBox(style->borderTopWidth(), style->borderRightWidth(), style->borderBottomWidth(), style->borderLeftWidth());
99 borderBox = m_theme->controlBorder(part, style->font(), borderBox, style->effectiveZoom());
100 if (borderBox.top().value() != style->borderTopWidth()) {
102 style->setBorderTopWidth(borderBox.top().value());
104 style->resetBorderTop();
106 if (borderBox.right().value() != style->borderRightWidth()) {
108 style->setBorderRightWidth(borderBox.right().value());
110 style->resetBorderRight();
112 if (borderBox.bottom().value() != style->borderBottomWidth()) {
113 style->setBorderBottomWidth(borderBox.bottom().value());
115 style->setBorderBottomWidth(borderBox.bottom().value());
117 style->resetBorderBottom();
119 if (borderBox.left().value() != style->borderLeftWidth()) {
120 style->setBorderLeftWidth(borderBox.left().value());
122 style->setBorderLeftWidth(borderBox.left().value());
124 style->resetBorderLeft();
128 LengthBox paddingBox = m_theme->controlPadding(part, style->font(), style->paddingBox(), style->effectiveZoom());
129 if (paddingBox != style->paddingBox())
130 style->setPaddingBox(paddingBox);
134 style->setWhiteSpace(PRE);
139 LengthSize controlSize = m_theme->controlSize(part, style->font(), LengthSize(style->width(), style->height()), style->effectiveZoom());
140 if (controlSize.width() != style->width())
141 style->setWidth(controlSize.width());
142 if (controlSize.height() != style->height())
143 style->setHeight(controlSize.height());
146 LengthSize minControlSize = m_theme->minimumControlSize(part, style->font(), style->effectiveZoom());
147 if (minControlSize.width() != style->minWidth())
148 style->setMinWidth(minControlSize.width());
149 if (minControlSize.height() != style->minHeight())
150 style->setMinHeight(minControlSize.height());
153 FontDescription controlFont = m_theme->controlFont(part, style->font(), style->effectiveZoom());
154 if (controlFont != style->font().fontDescription()) {
156 style->setLineHeight(RenderStyle::initialLineHeight());
159 if (style->setFontDescription(controlFont))
160 style->font().update(0);
168 // Call the appropriate style adjustment method based off the appearance value.
169 switch (style->appearance()) {
172 return adjustCheckboxStyle(selector, style, e);
174 return adjustRadioStyle(selector, style, e);
180 return adjustButtonStyle(selector, style, e);
182 return adjustInnerSpinButtonStyle(selector, style, e);
184 return adjustOuterSpinButtonStyle(selector, style, e);
187 return adjustTextFieldStyle(selector, style, e);
189 return adjustTextAreaStyle(selector, style, e);
192 return adjustListboxStyle(selector, style, e);
195 return adjustMenuListStyle(selector, style, e);
197 return adjustMenuListButtonStyle(selector, style, e);
202 return adjustSliderTrackStyle(selector, style, e);
205 return adjustSliderThumbStyle(selector, style, e);
207 return adjustSearchFieldStyle(selector, style, e);
209 return adjustSearchFieldCancelButtonStyle(selector, style, e);
211 return adjustSearchFieldDecorationStyle(selector, style, e);
213 return adjustSearchFieldResultsDecorationStyle(selector, style, e);
215 return adjustSearchFieldResultsButtonStyle(selector, style, e);
234 ControlPart part = o->style()->appearance();
247 m_theme->paint(part, controlStatesForRenderer(o), const_cast<GraphicsContext*>(paintInfo.context), r, o->style()->effectiveZoom(), o->view()->frameView());
347 switch (o->style()->appearance()) {
385 switch (o->style()->appearance()) {
583 return box->height() + box->marginTop() + m_theme->baselinePositionAdjustment(o->style()->appearance()) * o->style()->effectiveZoom();
596 bool RenderTheme::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& background,
599 switch (style->appearance()) {
606 // FIXME: Uncomment this when making search fields style-able.
610 // Test the style to see if the UA border and background match.
611 return (style->border() != border ||
612 *style->backgroundLayers() != background ||
613 style->backgroundColor() != backgroundColor);
622 m_theme->inflateControlPaintRect(o->style()->appearance(), controlStatesForRenderer(o), r, o->style()->effectiveZoom());
626 bool RenderTheme::supportsFocusRing(const RenderStyle* style) const
628 return (style->hasAppearance() && style->appearance() != TextFieldPart && style->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart && style->appearance() != ListboxPart);
634 if (state == HoverState && !supportsHover(o->style()))
653 if (isFocused(o) && o->style()->outlineStyleIsAuto())
764 return o->style()->appearance() == DefaultButtonPart;
769 void RenderTheme::adjustCheckboxStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
774 setCheckboxSize(style);
777 style->resetPadding();
781 style->resetBorder();
783 style->setBoxShadow(0);
786 void RenderTheme::adjustRadioStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
791 setRadioSize(style);
794 style->resetPadding();
798 style->resetBorder();
800 style->setBoxShadow(0);
803 void RenderTheme::adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
805 // Most platforms will completely honor all CSS, and so we have no need to adjust the style
807 setButtonSize(style);