Changeset 79997 in webkit
- Timestamp:
- Mar 1, 2011 6:13:04 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r79966 r79997 1 2011-03-01 Juha Savolainen <juha.savolainen@weego.fi> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] WebKit2 needs to support font size changing and getting default font size 6 https://bugs.webkit.org/show_bug.cgi?id=53671 7 8 Added new enum for font size type and added methods to set and get default font sizes. 9 10 * UIProcess/API/qt/qwkpreferences.cpp: 11 (QWKPreferences::setFontSize): Added. 12 (QWKPreferences::fontSize): Added. 13 * UIProcess/API/qt/qwkpreferences.h: 14 1 15 2011-02-28 Alice Liu <alice.liu@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/qt/qwkpreferences.cpp
r76916 r79997 185 185 } 186 186 } 187 188 void QWKPreferences::setFontSize(FontSize type, int size) 189 { 190 switch (type) { 191 case MinimumFontSize: 192 WKPreferencesSetMinimumFontSize(d->ref, size); 193 break; 194 case DefaultFontSize: 195 WKPreferencesSetDefaultFontSize(d->ref, size); 196 break; 197 case DefaultFixedFontSize: 198 WKPreferencesSetDefaultFixedFontSize(d->ref, size); 199 break; 200 default: 201 ASSERT_NOT_REACHED(); 202 } 203 } 204 205 int QWKPreferences::fontSize(FontSize type) const 206 { 207 switch (type) { 208 case MinimumFontSize: 209 return WKPreferencesGetMinimumFontSize(d->ref); 210 case DefaultFontSize: 211 return WKPreferencesGetDefaultFontSize(d->ref); 212 case DefaultFixedFontSize: 213 return WKPreferencesGetDefaultFixedFontSize(d->ref); 214 default: 215 ASSERT_NOT_REACHED(); 216 return false; 217 } 218 } 219 -
trunk/Source/WebKit2/UIProcess/API/qt/qwkpreferences.h
r74738 r79997 50 50 }; 51 51 52 enum FontSize { 53 MinimumFontSize, 54 DefaultFontSize, 55 DefaultFixedFontSize 56 }; 57 52 58 static QWKPreferences* sharedPreferences(); 53 59 … … 57 63 void setAttribute(WebAttribute attr, bool on); 58 64 bool testAttribute(WebAttribute attr) const; 65 66 void setFontSize(FontSize type, int size); 67 int fontSize(FontSize type) const; 59 68 60 69 private:
Note: See TracChangeset
for help on using the changeset viewer.