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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
30 #include "RuntimeEnabledFeatures.h" 30 #include "RuntimeEnabledFeatures.h"
31 #include "core/dom/ExceptionCode.h" 31 #include "core/dom/ExceptionCode.h"
32 #include "core/page/Page.h" 32 #include "core/page/Page.h"
33 #include "core/page/Settings.h" 33 #include "core/page/Settings.h"
34 #include "core/platform/ColorChooser.h" 34 #include "core/platform/ColorChooser.h"
35 #include "core/platform/Supplementable.h" 35 #include "core/platform/Supplementable.h"
36 #include "core/platform/text/LocaleToScriptMapping.h" 36 #include "core/platform/text/LocaleToScriptMapping.h"
37 37
38 #define InternalSettingsGuardForSettingsReturn(returnValue) \ 38 #define InternalSettingsGuardForSettingsReturn(returnValue) \
39 if (!settings()) { \ 39 if (!settings()) { \
40 ec = INVALID_ACCESS_ERR; \ 40 ec = InvalidAccessError; \
41 return returnValue; \ 41 return returnValue; \
42 } 42 }
43 43
44 #define InternalSettingsGuardForSettings() \ 44 #define InternalSettingsGuardForSettings() \
45 if (!settings()) { \ 45 if (!settings()) { \
46 ec = INVALID_ACCESS_ERR; \ 46 ec = InvalidAccessError; \
47 return; \ 47 return; \
48 } 48 }
49 49
50 #define InternalSettingsGuardForPage() \ 50 #define InternalSettingsGuardForPage() \
51 if (!page()) { \ 51 if (!page()) { \
52 ec = INVALID_ACCESS_ERR; \ 52 ec = InvalidAccessError; \
53 return; \ 53 return; \
54 } 54 }
55 55
56 namespace WebCore { 56 namespace WebCore {
57 57
58 InternalSettings::Backup::Backup(Settings* settings) 58 InternalSettings::Backup::Backup(Settings* settings)
59 : m_originalCSSExclusionsEnabled(RuntimeEnabledFeatures::cssExclusionsEnable d()) 59 : m_originalCSSExclusionsEnabled(RuntimeEnabledFeatures::cssExclusionsEnable d())
60 , m_originalAuthorShadowDOMForAnyElementEnabled(RuntimeEnabledFeatures::auth orShadowDOMForAnyElementEnabled()) 60 , m_originalAuthorShadowDOMForAnyElementEnabled(RuntimeEnabledFeatures::auth orShadowDOMForAnyElementEnabled())
61 , m_originalExperimentalShadowDOMEnabled(RuntimeEnabledFeatures::experimenta lShadowDOMEnabled()) 61 , m_originalExperimentalShadowDOMEnabled(RuntimeEnabledFeatures::experimenta lShadowDOMEnabled())
62 , m_originalExperimentalWebSocketEnabled(settings->experimentalWebSocketEnab led()) 62 , m_originalExperimentalWebSocketEnabled(settings->experimentalWebSocketEnab led())
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 InternalSettingsGuardForSettings(); 282 InternalSettingsGuardForSettings();
283 if (equalIgnoringCase(editingBehavior, "win")) 283 if (equalIgnoringCase(editingBehavior, "win"))
284 settings()->setEditingBehaviorType(EditingWindowsBehavior); 284 settings()->setEditingBehaviorType(EditingWindowsBehavior);
285 else if (equalIgnoringCase(editingBehavior, "mac")) 285 else if (equalIgnoringCase(editingBehavior, "mac"))
286 settings()->setEditingBehaviorType(EditingMacBehavior); 286 settings()->setEditingBehaviorType(EditingMacBehavior);
287 else if (equalIgnoringCase(editingBehavior, "unix")) 287 else if (equalIgnoringCase(editingBehavior, "unix"))
288 settings()->setEditingBehaviorType(EditingUnixBehavior); 288 settings()->setEditingBehaviorType(EditingUnixBehavior);
289 else if (equalIgnoringCase(editingBehavior, "android")) 289 else if (equalIgnoringCase(editingBehavior, "android"))
290 settings()->setEditingBehaviorType(EditingAndroidBehavior); 290 settings()->setEditingBehaviorType(EditingAndroidBehavior);
291 else 291 else
292 ec = SYNTAX_ERR; 292 ec = SyntaxError;
293 } 293 }
294 294
295 void InternalSettings::setDialogElementEnabled(bool enabled) 295 void InternalSettings::setDialogElementEnabled(bool enabled)
296 { 296 {
297 RuntimeEnabledFeatures::setDialogElementEnabled(enabled); 297 RuntimeEnabledFeatures::setDialogElementEnabled(enabled);
298 } 298 }
299 299
300 void InternalSettings::setLazyLayoutEnabled(bool enabled) 300 void InternalSettings::setLazyLayoutEnabled(bool enabled)
301 { 301 {
302 RuntimeEnabledFeatures::setLazyLayoutEnabled(enabled); 302 RuntimeEnabledFeatures::setLazyLayoutEnabled(enabled);
(...skipping 10 matching lines...) Expand all
313 settings()->setImagesEnabled(enabled); 313 settings()->setImagesEnabled(enabled);
314 } 314 }
315 315
316 void InternalSettings::setDefaultVideoPosterURL(const String& url, ExceptionCode & ec) 316 void InternalSettings::setDefaultVideoPosterURL(const String& url, ExceptionCode & ec)
317 { 317 {
318 InternalSettingsGuardForSettings(); 318 InternalSettingsGuardForSettings();
319 settings()->setDefaultVideoPosterURL(url); 319 settings()->setDefaultVideoPosterURL(url);
320 } 320 }
321 321
322 } 322 }
OLDNEW
« no previous file with comments | « Source/core/svg/properties/SVGTransformListPropertyTearOff.h ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698