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