Chromium Code Reviews| 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(); | |
| 235 m_page->setNeedsRecalcStyleInAllFrames(); | 236 m_page->setNeedsRecalcStyleInAllFrames(); |
|
eseidel
2014/02/14 05:39:15
It seems this can just fold into the notify now?
tasak
2014/02/14 08:27:46
You are right. Removed.
| |
| 236 } | 237 } |
| 237 | 238 |
| 238 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri ng& script, ExceptionState& exceptionState) | 239 void InternalSettings::setSerifFontFamily(const AtomicString& family, const Stri ng& script, ExceptionState& exceptionState) |
| 239 { | 240 { |
| 240 InternalSettingsGuardForSettings(); | 241 InternalSettingsGuardForSettings(); |
| 241 UScriptCode code = scriptNameToCode(script); | 242 UScriptCode code = scriptNameToCode(script); |
| 242 if (code == USCRIPT_INVALID_CODE) | 243 if (code == USCRIPT_INVALID_CODE) |
| 243 return; | 244 return; |
| 244 settings()->genericFontFamilySettings().setSerif(family, code); | 245 settings()->genericFontFamilySettings().setSerif(family, code); |
| 246 settings()->notifyGenericFontFamilyChange(); | |
| 245 m_page->setNeedsRecalcStyleInAllFrames(); | 247 m_page->setNeedsRecalcStyleInAllFrames(); |
| 246 } | 248 } |
| 247 | 249 |
| 248 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const String& script, ExceptionState& exceptionState) | 250 void InternalSettings::setSansSerifFontFamily(const AtomicString& family, const String& script, ExceptionState& exceptionState) |
| 249 { | 251 { |
| 250 InternalSettingsGuardForSettings(); | 252 InternalSettingsGuardForSettings(); |
| 251 UScriptCode code = scriptNameToCode(script); | 253 UScriptCode code = scriptNameToCode(script); |
| 252 if (code == USCRIPT_INVALID_CODE) | 254 if (code == USCRIPT_INVALID_CODE) |
| 253 return; | 255 return; |
| 254 settings()->genericFontFamilySettings().setSansSerif(family, code); | 256 settings()->genericFontFamilySettings().setSansSerif(family, code); |
| 257 settings()->notifyGenericFontFamilyChange(); | |
| 255 m_page->setNeedsRecalcStyleInAllFrames(); | 258 m_page->setNeedsRecalcStyleInAllFrames(); |
| 256 } | 259 } |
| 257 | 260 |
| 258 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri ng& script, ExceptionState& exceptionState) | 261 void InternalSettings::setFixedFontFamily(const AtomicString& family, const Stri ng& script, ExceptionState& exceptionState) |
| 259 { | 262 { |
| 260 InternalSettingsGuardForSettings(); | 263 InternalSettingsGuardForSettings(); |
| 261 UScriptCode code = scriptNameToCode(script); | 264 UScriptCode code = scriptNameToCode(script); |
| 262 if (code == USCRIPT_INVALID_CODE) | 265 if (code == USCRIPT_INVALID_CODE) |
| 263 return; | 266 return; |
| 264 settings()->genericFontFamilySettings().setFixed(family, code); | 267 settings()->genericFontFamilySettings().setFixed(family, code); |
| 268 settings()->notifyGenericFontFamilyChange(); | |
| 265 m_page->setNeedsRecalcStyleInAllFrames(); | 269 m_page->setNeedsRecalcStyleInAllFrames(); |
| 266 } | 270 } |
| 267 | 271 |
| 268 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St ring& script, ExceptionState& exceptionState) | 272 void InternalSettings::setCursiveFontFamily(const AtomicString& family, const St ring& script, ExceptionState& exceptionState) |
| 269 { | 273 { |
| 270 InternalSettingsGuardForSettings(); | 274 InternalSettingsGuardForSettings(); |
| 271 UScriptCode code = scriptNameToCode(script); | 275 UScriptCode code = scriptNameToCode(script); |
| 272 if (code == USCRIPT_INVALID_CODE) | 276 if (code == USCRIPT_INVALID_CODE) |
| 273 return; | 277 return; |
| 274 settings()->genericFontFamilySettings().setCursive(family, code); | 278 settings()->genericFontFamilySettings().setCursive(family, code); |
| 279 settings()->notifyGenericFontFamilyChange(); | |
| 275 m_page->setNeedsRecalcStyleInAllFrames(); | 280 m_page->setNeedsRecalcStyleInAllFrames(); |
| 276 } | 281 } |
| 277 | 282 |
| 278 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St ring& script, ExceptionState& exceptionState) | 283 void InternalSettings::setFantasyFontFamily(const AtomicString& family, const St ring& script, ExceptionState& exceptionState) |
| 279 { | 284 { |
| 280 InternalSettingsGuardForSettings(); | 285 InternalSettingsGuardForSettings(); |
| 281 UScriptCode code = scriptNameToCode(script); | 286 UScriptCode code = scriptNameToCode(script); |
| 282 if (code == USCRIPT_INVALID_CODE) | 287 if (code == USCRIPT_INVALID_CODE) |
| 283 return; | 288 return; |
| 284 settings()->genericFontFamilySettings().setFantasy(family, code); | 289 settings()->genericFontFamilySettings().setFantasy(family, code); |
| 290 settings()->notifyGenericFontFamilyChange(); | |
| 285 m_page->setNeedsRecalcStyleInAllFrames(); | 291 m_page->setNeedsRecalcStyleInAllFrames(); |
| 286 } | 292 } |
| 287 | 293 |
| 288 void InternalSettings::setPictographFontFamily(const AtomicString& family, const String& script, ExceptionState& exceptionState) | 294 void InternalSettings::setPictographFontFamily(const AtomicString& family, const String& script, ExceptionState& exceptionState) |
| 289 { | 295 { |
| 290 InternalSettingsGuardForSettings(); | 296 InternalSettingsGuardForSettings(); |
| 291 UScriptCode code = scriptNameToCode(script); | 297 UScriptCode code = scriptNameToCode(script); |
| 292 if (code == USCRIPT_INVALID_CODE) | 298 if (code == USCRIPT_INVALID_CODE) |
| 293 return; | 299 return; |
| 294 settings()->genericFontFamilySettings().setPictograph(family, code); | 300 settings()->genericFontFamilySettings().setPictograph(family, code); |
| 301 settings()->notifyGenericFontFamilyChange(); | |
| 295 m_page->setNeedsRecalcStyleInAllFrames(); | 302 m_page->setNeedsRecalcStyleInAllFrames(); |
| 296 } | 303 } |
| 297 | 304 |
| 298 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex ceptionState) | 305 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionState& ex ceptionState) |
| 299 { | 306 { |
| 300 InternalSettingsGuardForSettings(); | 307 InternalSettingsGuardForSettings(); |
| 301 m_page->inspectorController().setTextAutosizingEnabled(enabled); | 308 m_page->inspectorController().setTextAutosizingEnabled(enabled); |
| 302 } | 309 } |
| 303 | 310 |
| 304 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height , ExceptionState& exceptionState) | 311 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height , ExceptionState& exceptionState) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 356 settings()->setDefaultVideoPosterURL(url); | 363 settings()->setDefaultVideoPosterURL(url); |
| 357 } | 364 } |
| 358 | 365 |
| 359 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce ptionState& exceptionState) | 366 void InternalSettings::setPasswordGenerationDecorationEnabled(bool enabled, Exce ptionState& exceptionState) |
| 360 { | 367 { |
| 361 InternalSettingsGuardForSettings(); | 368 InternalSettingsGuardForSettings(); |
| 362 settings()->setPasswordGenerationDecorationEnabled(enabled); | 369 settings()->setPasswordGenerationDecorationEnabled(enabled); |
| 363 } | 370 } |
| 364 | 371 |
| 365 } | 372 } |
| OLD | NEW |