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