Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/WebKit/Source/core/testing/InternalSettings.cpp

Issue 2811793004: Rename EqualIgnoringCase*() to DeprecatedEqualIgnoringCase*() (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 void InternalSettings::setViewportMetaEnabled(bool enabled, 191 void InternalSettings::setViewportMetaEnabled(bool enabled,
192 ExceptionState& exception_state) { 192 ExceptionState& exception_state) {
193 InternalSettingsGuardForSettings(); 193 InternalSettingsGuardForSettings();
194 GetSettings()->SetViewportMetaEnabled(enabled); 194 GetSettings()->SetViewportMetaEnabled(enabled);
195 } 195 }
196 196
197 void InternalSettings::setViewportStyle(const String& style, 197 void InternalSettings::setViewportStyle(const String& style,
198 ExceptionState& exception_state) { 198 ExceptionState& exception_state) {
199 InternalSettingsGuardForSettings(); 199 InternalSettingsGuardForSettings();
200 if (EqualIgnoringCase(style, "default")) 200 if (DeprecatedEqualIgnoringCase(style, "default"))
201 GetSettings()->SetViewportStyle(WebViewportStyle::kDefault); 201 GetSettings()->SetViewportStyle(WebViewportStyle::kDefault);
202 else if (EqualIgnoringCase(style, "mobile")) 202 else if (DeprecatedEqualIgnoringCase(style, "mobile"))
203 GetSettings()->SetViewportStyle(WebViewportStyle::kMobile); 203 GetSettings()->SetViewportStyle(WebViewportStyle::kMobile);
204 else if (EqualIgnoringCase(style, "television")) 204 else if (DeprecatedEqualIgnoringCase(style, "television"))
205 GetSettings()->SetViewportStyle(WebViewportStyle::kTelevision); 205 GetSettings()->SetViewportStyle(WebViewportStyle::kTelevision);
206 else 206 else
207 exception_state.ThrowDOMException( 207 exception_state.ThrowDOMException(
208 kSyntaxError, 208 kSyntaxError,
209 "The viewport style type provided ('" + style + "') is invalid."); 209 "The viewport style type provided ('" + style + "') is invalid.");
210 } 210 }
211 211
212 void InternalSettings::setStandardFontFamily(const AtomicString& family, 212 void InternalSettings::setStandardFontFamily(const AtomicString& family,
213 const String& script, 213 const String& script,
214 ExceptionState& exception_state) { 214 ExceptionState& exception_state) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 void InternalSettings::setAccessibilityFontScaleFactor( 335 void InternalSettings::setAccessibilityFontScaleFactor(
336 float font_scale_factor, 336 float font_scale_factor,
337 ExceptionState& exception_state) { 337 ExceptionState& exception_state) {
338 InternalSettingsGuardForSettings(); 338 InternalSettingsGuardForSettings();
339 GetSettings()->SetAccessibilityFontScaleFactor(font_scale_factor); 339 GetSettings()->SetAccessibilityFontScaleFactor(font_scale_factor);
340 } 340 }
341 341
342 void InternalSettings::setEditingBehavior(const String& editing_behavior, 342 void InternalSettings::setEditingBehavior(const String& editing_behavior,
343 ExceptionState& exception_state) { 343 ExceptionState& exception_state) {
344 InternalSettingsGuardForSettings(); 344 InternalSettingsGuardForSettings();
345 if (EqualIgnoringCase(editing_behavior, "win")) 345 if (DeprecatedEqualIgnoringCase(editing_behavior, "win"))
346 GetSettings()->SetEditingBehaviorType(kEditingWindowsBehavior); 346 GetSettings()->SetEditingBehaviorType(kEditingWindowsBehavior);
347 else if (EqualIgnoringCase(editing_behavior, "mac")) 347 else if (DeprecatedEqualIgnoringCase(editing_behavior, "mac"))
348 GetSettings()->SetEditingBehaviorType(kEditingMacBehavior); 348 GetSettings()->SetEditingBehaviorType(kEditingMacBehavior);
349 else if (EqualIgnoringCase(editing_behavior, "unix")) 349 else if (DeprecatedEqualIgnoringCase(editing_behavior, "unix"))
350 GetSettings()->SetEditingBehaviorType(kEditingUnixBehavior); 350 GetSettings()->SetEditingBehaviorType(kEditingUnixBehavior);
351 else if (EqualIgnoringCase(editing_behavior, "android")) 351 else if (DeprecatedEqualIgnoringCase(editing_behavior, "android"))
352 GetSettings()->SetEditingBehaviorType(kEditingAndroidBehavior); 352 GetSettings()->SetEditingBehaviorType(kEditingAndroidBehavior);
353 else 353 else
354 exception_state.ThrowDOMException(kSyntaxError, 354 exception_state.ThrowDOMException(kSyntaxError,
355 "The editing behavior type provided ('" + 355 "The editing behavior type provided ('" +
356 editing_behavior + "') is invalid."); 356 editing_behavior + "') is invalid.");
357 } 357 }
358 358
359 void InternalSettings::setLangAttributeAwareFormControlUIEnabled(bool enabled) { 359 void InternalSettings::setLangAttributeAwareFormControlUIEnabled(bool enabled) {
360 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(enabled); 360 RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(enabled);
361 } 361 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 exception_state.ThrowDOMException( 485 exception_state.ThrowDOMException(
486 kSyntaxError, "The hover type token ('" + token + ")' is invalid."); 486 kSyntaxError, "The hover type token ('" + token + ")' is invalid.");
487 487
488 GetSettings()->SetPrimaryHoverType(hover_type); 488 GetSettings()->SetPrimaryHoverType(hover_type);
489 } 489 }
490 490
491 void InternalSettings::setImageAnimationPolicy( 491 void InternalSettings::setImageAnimationPolicy(
492 const String& policy, 492 const String& policy,
493 ExceptionState& exception_state) { 493 ExceptionState& exception_state) {
494 InternalSettingsGuardForSettings(); 494 InternalSettingsGuardForSettings();
495 if (EqualIgnoringCase(policy, "allowed")) 495 if (DeprecatedEqualIgnoringCase(policy, "allowed"))
496 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyAllowed); 496 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyAllowed);
497 else if (EqualIgnoringCase(policy, "once")) 497 else if (DeprecatedEqualIgnoringCase(policy, "once"))
498 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyAnimateOnce); 498 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyAnimateOnce);
499 else if (EqualIgnoringCase(policy, "none")) 499 else if (DeprecatedEqualIgnoringCase(policy, "none"))
500 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyNoAnimation); 500 GetSettings()->SetImageAnimationPolicy(kImageAnimationPolicyNoAnimation);
501 else 501 else
502 exception_state.ThrowDOMException( 502 exception_state.ThrowDOMException(
503 kSyntaxError, 503 kSyntaxError,
504 "The image animation policy provided ('" + policy + "') is invalid."); 504 "The image animation policy provided ('" + policy + "') is invalid.");
505 } 505 }
506 506
507 void InternalSettings::setScrollTopLeftInteropEnabled(bool enabled) { 507 void InternalSettings::setScrollTopLeftInteropEnabled(bool enabled) {
508 RuntimeEnabledFeatures::setScrollTopLeftInteropEnabled(enabled); 508 RuntimeEnabledFeatures::setScrollTopLeftInteropEnabled(enabled);
509 } 509 }
(...skipping 18 matching lines...) Expand all
528 } 528 }
529 529
530 void InternalSettings::setPresentationReceiver( 530 void InternalSettings::setPresentationReceiver(
531 bool enabled, 531 bool enabled,
532 ExceptionState& exception_state) { 532 ExceptionState& exception_state) {
533 InternalSettingsGuardForSettings(); 533 InternalSettingsGuardForSettings();
534 GetSettings()->SetPresentationReceiver(enabled); 534 GetSettings()->SetPresentationReceiver(enabled);
535 } 535 }
536 536
537 } // namespace blink 537 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698