| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 InternalSettingsGuardForSettings(); | 215 InternalSettingsGuardForSettings(); |
| 216 settings()->setLayerSquashingEnabled(enabled); | 216 settings()->setLayerSquashingEnabled(enabled); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) | 219 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) |
| 220 { | 220 { |
| 221 InternalSettingsGuardForSettings(); | 221 InternalSettingsGuardForSettings(); |
| 222 UScriptCode code = scriptNameToCode(script); | 222 UScriptCode code = scriptNameToCode(script); |
| 223 if (code == USCRIPT_INVALID_CODE) | 223 if (code == USCRIPT_INVALID_CODE) |
| 224 return; | 224 return; |
| 225 settings()->setStandardFontFamily(family, code); | 225 settings()->genericFontFamilySettings().setStandard(family, code); |
| 226 m_page->setNeedsRecalcStyleInAllFrames(); | 226 m_page->setNeedsRecalcStyleInAllFrames(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) | 229 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) |
| 230 { | 230 { |
| 231 InternalSettingsGuardForSettings(); | 231 InternalSettingsGuardForSettings(); |
| 232 UScriptCode code = scriptNameToCode(script); | 232 UScriptCode code = scriptNameToCode(script); |
| 233 if (code == USCRIPT_INVALID_CODE) | 233 if (code == USCRIPT_INVALID_CODE) |
| 234 return; | 234 return; |
| 235 settings()->setSerifFontFamily(family, code); | 235 settings()->genericFontFamilySettings().setSerif(family, code); |
| 236 m_page->setNeedsRecalcStyleInAllFrames(); | 236 m_page->setNeedsRecalcStyleInAllFrames(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) | 239 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) |
| 240 { | 240 { |
| 241 InternalSettingsGuardForSettings(); | 241 InternalSettingsGuardForSettings(); |
| 242 UScriptCode code = scriptNameToCode(script); | 242 UScriptCode code = scriptNameToCode(script); |
| 243 if (code == USCRIPT_INVALID_CODE) | 243 if (code == USCRIPT_INVALID_CODE) |
| 244 return; | 244 return; |
| 245 settings()->setSansSerifFontFamily(family, code); | 245 settings()->genericFontFamilySettings().setSansSerif(family, code); |
| 246 m_page->setNeedsRecalcStyleInAllFrames(); | 246 m_page->setNeedsRecalcStyleInAllFrames(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) | 249 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) |
| 250 { | 250 { |
| 251 InternalSettingsGuardForSettings(); | 251 InternalSettingsGuardForSettings(); |
| 252 UScriptCode code = scriptNameToCode(script); | 252 UScriptCode code = scriptNameToCode(script); |
| 253 if (code == USCRIPT_INVALID_CODE) | 253 if (code == USCRIPT_INVALID_CODE) |
| 254 return; | 254 return; |
| 255 settings()->setFixedFontFamily(family, code); | 255 settings()->genericFontFamilySettings().setFixed(family, code); |
| 256 m_page->setNeedsRecalcStyleInAllFrames(); | 256 m_page->setNeedsRecalcStyleInAllFrames(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) | 259 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) |
| 260 { | 260 { |
| 261 InternalSettingsGuardForSettings(); | 261 InternalSettingsGuardForSettings(); |
| 262 UScriptCode code = scriptNameToCode(script); | 262 UScriptCode code = scriptNameToCode(script); |
| 263 if (code == USCRIPT_INVALID_CODE) | 263 if (code == USCRIPT_INVALID_CODE) |
| 264 return; | 264 return; |
| 265 settings()->setCursiveFontFamily(family, code); | 265 settings()->genericFontFamilySettings().setCursive(family, code); |
| 266 m_page->setNeedsRecalcStyleInAllFrames(); | 266 m_page->setNeedsRecalcStyleInAllFrames(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) | 269 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) |
| 270 { | 270 { |
| 271 InternalSettingsGuardForSettings(); | 271 InternalSettingsGuardForSettings(); |
| 272 UScriptCode code = scriptNameToCode(script); | 272 UScriptCode code = scriptNameToCode(script); |
| 273 if (code == USCRIPT_INVALID_CODE) | 273 if (code == USCRIPT_INVALID_CODE) |
| 274 return; | 274 return; |
| 275 settings()->setFantasyFontFamily(family, code); | 275 settings()->genericFontFamilySettings().setFantasy(family, code); |
| 276 m_page->setNeedsRecalcStyleInAllFrames(); | 276 m_page->setNeedsRecalcStyleInAllFrames(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void InternalSettings::setPictographFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) | 279 void InternalSettings::setPictographFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) |
| 280 { | 280 { |
| 281 InternalSettingsGuardForSettings(); | 281 InternalSettingsGuardForSettings(); |
| 282 UScriptCode code = scriptNameToCode(script); | 282 UScriptCode code = scriptNameToCode(script); |
| 283 if (code == USCRIPT_INVALID_CODE) | 283 if (code == USCRIPT_INVALID_CODE) |
| 284 return; | 284 return; |
| 285 settings()->setPictographFontFamily(family, code); | 285 settings()->genericFontFamilySettings().setPictograph(family, code); |
| 286 m_page->setNeedsRecalcStyleInAllFrames(); | 286 m_page->setNeedsRecalcStyleInAllFrames(); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex
ceptionState) | 289 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex
ceptionState) |
| 290 { | 290 { |
| 291 InternalSettingsGuardForSettings(); | 291 InternalSettingsGuardForSettings(); |
| 292 settings()->setTextAutosizingEnabled(enabled); | 292 settings()->setTextAutosizingEnabled(enabled); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) | 295 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 settings()->setDefaultVideoPosterURL(url); | 347 settings()->setDefaultVideoPosterURL(url); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce
ptionState& exceptionState) | 350 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce
ptionState& exceptionState) |
| 351 { | 351 { |
| 352 InternalSettingsGuardForSettings(); | 352 InternalSettingsGuardForSettings(); |
| 353 settings()->setPasswordGenerationDecorationEnabled(enabled); | 353 settings()->setPasswordGenerationDecorationEnabled(enabled); |
| 354 } | 354 } |
| 355 | 355 |
| 356 } | 356 } |
| OLD | NEW |