| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 InternalSettingsGuardForSettings(); | 284 InternalSettingsGuardForSettings(); |
| 285 settings()->setTextAutosizingEnabled(enabled); | 285 settings()->setTextAutosizingEnabled(enabled); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) | 288 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height
, ExceptionState& exceptionState) |
| 289 { | 289 { |
| 290 InternalSettingsGuardForSettings(); | 290 InternalSettingsGuardForSettings(); |
| 291 settings()->setTextAutosizingWindowSizeOverride(IntSize(width, height)); | 291 settings()->setTextAutosizingWindowSizeOverride(IntSize(width, height)); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void InternalSettings::setTextTrackKindUserPreference(const String& preference,
ExceptionState& exceptionState) |
| 295 { |
| 296 InternalSettingsGuardForSettings(); |
| 297 String token = preference.stripWhiteSpace(); |
| 298 TextTrackKindUserPreference userPreference = TextTrackKindUserPreference::De
fault; |
| 299 if (token == "default") |
| 300 userPreference = TextTrackKindUserPreference::Default; |
| 301 else if (token == "captions") |
| 302 userPreference = TextTrackKindUserPreference::Captions; |
| 303 else if (token == "subtitles") |
| 304 userPreference = TextTrackKindUserPreference::Subtitles; |
| 305 else |
| 306 exceptionState.throwDOMException(SyntaxError, "The user preference for t
ext track kind " + preference + ")' is invalid."); |
| 307 |
| 308 settings()->setTextTrackKindUserPreference(userPreference); |
| 309 } |
| 310 |
| 294 void InternalSettings::setMediaTypeOverride(const String& mediaType, ExceptionSt
ate& exceptionState) | 311 void InternalSettings::setMediaTypeOverride(const String& mediaType, ExceptionSt
ate& exceptionState) |
| 295 { | 312 { |
| 296 InternalSettingsGuardForSettings(); | 313 InternalSettingsGuardForSettings(); |
| 297 settings()->setMediaTypeOverride(mediaType); | 314 settings()->setMediaTypeOverride(mediaType); |
| 298 } | 315 } |
| 299 | 316 |
| 300 void InternalSettings::setAccessibilityFontScaleFactor(float fontScaleFactor, Ex
ceptionState& exceptionState) | 317 void InternalSettings::setAccessibilityFontScaleFactor(float fontScaleFactor, Ex
ceptionState& exceptionState) |
| 301 { | 318 { |
| 302 InternalSettingsGuardForSettings(); | 319 InternalSettingsGuardForSettings(); |
| 303 settings()->setAccessibilityFontScaleFactor(fontScaleFactor); | 320 settings()->setAccessibilityFontScaleFactor(fontScaleFactor); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 settings()->setLogDnsPrefetchAndPreconnect(enabled); | 498 settings()->setLogDnsPrefetchAndPreconnect(enabled); |
| 482 } | 499 } |
| 483 | 500 |
| 484 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception
State) | 501 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception
State) |
| 485 { | 502 { |
| 486 InternalSettingsGuardForSettings(); | 503 InternalSettingsGuardForSettings(); |
| 487 settings()->setLogPreload(enabled); | 504 settings()->setLogPreload(enabled); |
| 488 } | 505 } |
| 489 | 506 |
| 490 } | 507 } |
| OLD | NEW |