Changeset 93937 in webkit
- Timestamp:
- Aug 27, 2011 4:06:22 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93936 r93937 1 2011-08-27 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Need spin-button implementation 4 https://bugs.webkit.org/show_bug.cgi?id=65896 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * platform/qt/Skipped: 9 * platform/qt/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt: Added. 10 * platform/qt/fast/forms/input-appearance-spinbutton-layer-expected.txt: Added. 11 * platform/qt/fast/forms/input-appearance-spinbutton-visibility-expected.txt: Added. 12 1 13 2011-08-27 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/LayoutTests/platform/qt/Skipped
r93936 r93937 1671 1671 fast/text/bidi-explicit-embedding-past-end.html 1672 1672 1673 # Need to implement inner-spin-button1674 # https://bugs.webkit.org/show_bug.cgi?id=658961675 fast/forms/input-appearance-spinbutton-disabled-readonly.html1676 fast/forms/input-appearance-spinbutton-layer.html1677 fast/forms/input-appearance-spinbutton-visibility.html1678 fast/forms/input-number-events.html1679 fast/forms/input-number-large-padding.html1680 fast/forms/input-number-size.html1681 fast/forms/input-spinbutton-capturing.html1682 fast/forms/spin-button-gets-disabled-or-readonly.html1683 1684 1673 # [Qt] fast/dom/beforeload/script-before-load-dynamic.html is crashy-flakey 1685 1674 # https://bugs.webkit.org/show_bug.cgi?id=41452 -
trunk/Source/WebCore/ChangeLog
r93935 r93937 1 2011-08-27 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Need spin-button implementation 4 https://bugs.webkit.org/show_bug.cgi?id=65896 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * platform/qt/RenderThemeQt.cpp: 9 (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): 10 (WebCore::RenderThemeQt::paintInnerSpinButton): 11 * platform/qt/RenderThemeQt.h: 12 1 13 2011-08-26 Xiaomei Ji <xji@chromium.org> 2 14 -
trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp
r93702 r93937 1069 1069 } 1070 1070 1071 void RenderThemeQt::adjustInnerSpinButtonStyle(CSSStyleSelector* selector, RenderStyle* style, 1072 Element* e) const 1073 { 1074 // Use the same width as our native scrollbar 1075 int width = ScrollbarTheme::nativeTheme()->scrollbarThickness(); 1076 style->setWidth(Length(width, Fixed)); 1077 style->setMinWidth(Length(width, Fixed)); 1078 } 1079 1080 bool RenderThemeQt::paintInnerSpinButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& rect) 1081 { 1082 StylePainter p(this, paintInfo); 1083 if (!p.isValid()) 1084 return true; 1085 1086 QStyleOptionSpinBox option; 1087 initStyleOption(p.widget, option); 1088 option.subControls = QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown; 1089 if (!isReadOnlyControl(o)) { 1090 if (isEnabled(o)) 1091 option.stepEnabled = QAbstractSpinBox::StepUpEnabled | QAbstractSpinBox::StepDownEnabled; 1092 if (isPressed(o)) { 1093 option.state |= QStyle::State_Sunken; 1094 if (isSpinUpButtonPartPressed(o)) 1095 option.activeSubControls = QStyle::SC_SpinBoxUp; 1096 else 1097 option.activeSubControls = QStyle::SC_SpinBoxDown; 1098 } 1099 } 1100 1101 IntRect buttonRect = rect; 1102 buttonRect.inflateY(-2); 1103 #if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) 1104 // QMacStyle will position the aqua buttons flush to the right. 1105 // This will move them more left for better style, a la 1106 // Chromium look & feel. 1107 if (qobject_cast<QMacStyle*>(p.style)) { 1108 buttonRect.inflateX(-4); 1109 // Render mini aqua spin buttons for QMacStyle to fit nicely into 1110 // the editor area, like Chromium. 1111 option.state |= QStyle::State_Mini; 1112 #else 1113 { 1114 buttonRect.inflateX(-2); 1115 #endif 1116 } 1117 option.rect = buttonRect; 1118 1119 p.drawComplexControl(QStyle::CC_SpinBox, option); 1120 return false; 1121 } 1122 1071 1123 bool RenderThemeQt::supportsFocus(ControlPart appearance) const 1072 1124 { -
trunk/Source/WebCore/platform/qt/RenderThemeQt.h
r89040 r93937 138 138 virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 139 139 virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&); 140 141 virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 142 virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&); 140 143 141 144 #if ENABLE(PROGRESS_TAG)
Note: See TracChangeset
for help on using the changeset viewer.