| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 settings()->setLayerSquashingEnabled(enabled); | 225 settings()->setLayerSquashingEnabled(enabled); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) | 228 void InternalSettings::setStandardFontFamily(const AtomicString& family, const S
tring& script, ExceptionState& exceptionState) |
| 229 { | 229 { |
| 230 InternalSettingsGuardForSettings(); | 230 InternalSettingsGuardForSettings(); |
| 231 UScriptCode code = scriptNameToCode(script); | 231 UScriptCode code = scriptNameToCode(script); |
| 232 if (code == USCRIPT_INVALID_CODE) | 232 if (code == USCRIPT_INVALID_CODE) |
| 233 return; | 233 return; |
| 234 settings()->genericFontFamilySettings().setStandard(family, code); | 234 settings()->genericFontFamilySettings().setStandard(family, code); |
| 235 settings()->notifyGenericFontFamilyChange(); | |
| 236 m_page->setNeedsRecalcStyleInAllFrames(); | 235 m_page->setNeedsRecalcStyleInAllFrames(); |
| 237 } | 236 } |
| 238 | 237 |
| 239 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) | 238 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) |
| 240 { | 239 { |
| 241 InternalSettingsGuardForSettings(); | 240 InternalSettingsGuardForSettings(); |
| 242 UScriptCode code = scriptNameToCode(script); | 241 UScriptCode code = scriptNameToCode(script); |
| 243 if (code == USCRIPT_INVALID_CODE) | 242 if (code == USCRIPT_INVALID_CODE) |
| 244 return; | 243 return; |
| 245 settings()->genericFontFamilySettings().setSerif(family, code); | 244 settings()->genericFontFamilySettings().setSerif(family, code); |
| 246 settings()->notifyGenericFontFamilyChange(); | |
| 247 m_page->setNeedsRecalcStyleInAllFrames(); | 245 m_page->setNeedsRecalcStyleInAllFrames(); |
| 248 } | 246 } |
| 249 | 247 |
| 250 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) | 248 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) |
| 251 { | 249 { |
| 252 InternalSettingsGuardForSettings(); | 250 InternalSettingsGuardForSettings(); |
| 253 UScriptCode code = scriptNameToCode(script); | 251 UScriptCode code = scriptNameToCode(script); |
| 254 if (code == USCRIPT_INVALID_CODE) | 252 if (code == USCRIPT_INVALID_CODE) |
| 255 return; | 253 return; |
| 256 settings()->genericFontFamilySettings().setSansSerif(family, code); | 254 settings()->genericFontFamilySettings().setSansSerif(family, code); |
| 257 settings()->notifyGenericFontFamilyChange(); | |
| 258 m_page->setNeedsRecalcStyleInAllFrames(); | 255 m_page->setNeedsRecalcStyleInAllFrames(); |
| 259 } | 256 } |
| 260 | 257 |
| 261 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) | 258 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri
ng& script, ExceptionState& exceptionState) |
| 262 { | 259 { |
| 263 InternalSettingsGuardForSettings(); | 260 InternalSettingsGuardForSettings(); |
| 264 UScriptCode code = scriptNameToCode(script); | 261 UScriptCode code = scriptNameToCode(script); |
| 265 if (code == USCRIPT_INVALID_CODE) | 262 if (code == USCRIPT_INVALID_CODE) |
| 266 return; | 263 return; |
| 267 settings()->genericFontFamilySettings().setFixed(family, code); | 264 settings()->genericFontFamilySettings().setFixed(family, code); |
| 268 settings()->notifyGenericFontFamilyChange(); | |
| 269 m_page->setNeedsRecalcStyleInAllFrames(); | 265 m_page->setNeedsRecalcStyleInAllFrames(); |
| 270 } | 266 } |
| 271 | 267 |
| 272 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) | 268 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) |
| 273 { | 269 { |
| 274 InternalSettingsGuardForSettings(); | 270 InternalSettingsGuardForSettings(); |
| 275 UScriptCode code = scriptNameToCode(script); | 271 UScriptCode code = scriptNameToCode(script); |
| 276 if (code == USCRIPT_INVALID_CODE) | 272 if (code == USCRIPT_INVALID_CODE) |
| 277 return; | 273 return; |
| 278 settings()->genericFontFamilySettings().setCursive(family, code); | 274 settings()->genericFontFamilySettings().setCursive(family, code); |
| 279 settings()->notifyGenericFontFamilyChange(); | |
| 280 m_page->setNeedsRecalcStyleInAllFrames(); | 275 m_page->setNeedsRecalcStyleInAllFrames(); |
| 281 } | 276 } |
| 282 | 277 |
| 283 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) | 278 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St
ring& script, ExceptionState& exceptionState) |
| 284 { | 279 { |
| 285 InternalSettingsGuardForSettings(); | 280 InternalSettingsGuardForSettings(); |
| 286 UScriptCode code = scriptNameToCode(script); | 281 UScriptCode code = scriptNameToCode(script); |
| 287 if (code == USCRIPT_INVALID_CODE) | 282 if (code == USCRIPT_INVALID_CODE) |
| 288 return; | 283 return; |
| 289 settings()->genericFontFamilySettings().setFantasy(family, code); | 284 settings()->genericFontFamilySettings().setFantasy(family, code); |
| 290 settings()->notifyGenericFontFamilyChange(); | |
| 291 m_page->setNeedsRecalcStyleInAllFrames(); | 285 m_page->setNeedsRecalcStyleInAllFrames(); |
| 292 } | 286 } |
| 293 | 287 |
| 294 void InternalSettings::setPictographFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) | 288 void InternalSettings::setPictographFontFamily(const AtomicString& family, const
String& script, ExceptionState& exceptionState) |
| 295 { | 289 { |
| 296 InternalSettingsGuardForSettings(); | 290 InternalSettingsGuardForSettings(); |
| 297 UScriptCode code = scriptNameToCode(script); | 291 UScriptCode code = scriptNameToCode(script); |
| 298 if (code == USCRIPT_INVALID_CODE) | 292 if (code == USCRIPT_INVALID_CODE) |
| 299 return; | 293 return; |
| 300 settings()->genericFontFamilySettings().setPictograph(family, code); | 294 settings()->genericFontFamilySettings().setPictograph(family, code); |
| 301 settings()->notifyGenericFontFamilyChange(); | |
| 302 m_page->setNeedsRecalcStyleInAllFrames(); | 295 m_page->setNeedsRecalcStyleInAllFrames(); |
| 303 } | 296 } |
| 304 | 297 |
| 305 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex
ceptionState) | 298 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex
ceptionState) |
| 306 { | 299 { |
| 307 InternalSettingsGuardForSettings(); | 300 InternalSettingsGuardForSettings(); |
| 308 settings()->setTextAutosizingEnabled(enabled); | 301 settings()->setTextAutosizingEnabled(enabled); |
| 309 } | 302 } |
| 310 | 303 |
| 311 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) | 304 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 settings()->setDefaultVideoPosterURL(url); | 356 settings()->setDefaultVideoPosterURL(url); |
| 364 } | 357 } |
| 365 | 358 |
| 366 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce
ptionState& exceptionState) | 359 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce
ptionState& exceptionState) |
| 367 { | 360 { |
| 368 InternalSettingsGuardForSettings(); | 361 InternalSettingsGuardForSettings(); |
| 369 settings()->setPasswordGenerationDecorationEnabled(enabled); | 362 settings()->setPasswordGenerationDecorationEnabled(enabled); |
| 370 } | 363 } |
| 371 | 364 |
| 372 } | 365 } |
| OLD | NEW |