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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 result.append(' '); 1244 result.append(' ');
1245 result.append(getPropertyName(properties[i])); 1245 result.append(getPropertyName(properties[i]));
1246 result.append(": ", 2); 1246 result.append(": ", 2);
1247 result.append(getPropertyValue(properties[i])); 1247 result.append(getPropertyValue(properties[i]));
1248 result.append(';'); 1248 result.append(';');
1249 } 1249 }
1250 1250
1251 return result.toString(); 1251 return result.toString();
1252 } 1252 }
1253 1253
1254 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& es) 1254 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& exce ptionState)
1255 { 1255 {
1256 es.throwDOMException(NoModificationAllowedError, "Failed to set the 'cssText ' property on a computed 'CSSStyleDeclaration': computed styles are read-only.") ; 1256 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to set the 'cssText' property on a computed 'CSSStyleDeclaration': computed styles are read-only.");
1257 } 1257 }
1258 1258
1259 static CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) 1259 static CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize)
1260 { 1260 {
1261 ASSERT_ARG(keywordSize, keywordSize); 1261 ASSERT_ARG(keywordSize, keywordSize);
1262 ASSERT_ARG(keywordSize, keywordSize <= 8); 1262 ASSERT_ARG(keywordSize, keywordSize <= 8);
1263 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); 1263 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1);
1264 } 1264 }
1265 1265
1266 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK eyword() const 1266 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK eyword() const
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3094 String CSSComputedStyleDeclaration::getPropertyShorthand(const String&) 3094 String CSSComputedStyleDeclaration::getPropertyShorthand(const String&)
3095 { 3095 {
3096 return ""; 3096 return "";
3097 } 3097 }
3098 3098
3099 bool CSSComputedStyleDeclaration::isPropertyImplicit(const String&) 3099 bool CSSComputedStyleDeclaration::isPropertyImplicit(const String&)
3100 { 3100 {
3101 return false; 3101 return false;
3102 } 3102 }
3103 3103
3104 void CSSComputedStyleDeclaration::setProperty(const String& name, const String&, const String&, ExceptionState& es) 3104 void CSSComputedStyleDeclaration::setProperty(const String& name, const String&, const String&, ExceptionState& exceptionState)
3105 { 3105 {
3106 es.throwDOMException(NoModificationAllowedError, "Failed to set the '" + nam e + "' property on a computed 'CSSStyleDeclaration': computed styles are read-on ly."); 3106 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to set the '" + name + "' property on a computed 'CSSStyleDeclaration': computed styles are read-only.");
3107 } 3107 }
3108 3108
3109 String CSSComputedStyleDeclaration::removeProperty(const String& name, Exception State& es) 3109 String CSSComputedStyleDeclaration::removeProperty(const String& name, Exception State& exceptionState)
3110 { 3110 {
3111 es.throwDOMException(NoModificationAllowedError, "Failed to remove the '" + name + "' property from a computed 'CSSStyleDeclaration': computed styles are re ad-only."); 3111 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to remo ve the '" + name + "' property from a computed 'CSSStyleDeclaration': computed s tyles are read-only.");
3112 return String(); 3112 return String();
3113 } 3113 }
3114 3114
3115 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CS SPropertyID propertyID) 3115 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CS SPropertyID propertyID)
3116 { 3116 {
3117 return getPropertyCSSValue(propertyID); 3117 return getPropertyCSSValue(propertyID);
3118 } 3118 }
3119 3119
3120 String CSSComputedStyleDeclaration::getPropertyValueInternal(CSSPropertyID prope rtyID) 3120 String CSSComputedStyleDeclaration::getPropertyValueInternal(CSSPropertyID prope rtyID)
3121 { 3121 {
3122 return getPropertyValue(propertyID); 3122 return getPropertyValue(propertyID);
3123 } 3123 }
3124 3124
3125 void CSSComputedStyleDeclaration::setPropertyInternal(CSSPropertyID id, const St ring&, bool, ExceptionState& es) 3125 void CSSComputedStyleDeclaration::setPropertyInternal(CSSPropertyID id, const St ring&, bool, ExceptionState& exceptionState)
3126 { 3126 {
3127 es.throwDOMException(NoModificationAllowedError, "Failed to set the '" + get PropertyNameString(id) + "' property on a computed 'CSSStyleDeclaration': comput ed styles are read-only."); 3127 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to set the '" + getPropertyNameString(id) + "' property on a computed 'CSSStyleDeclarat ion': computed styles are read-only.");
3128 } 3128 }
3129 3129
3130 const HashMap<AtomicString, String>* CSSComputedStyleDeclaration::variableMap() const 3130 const HashMap<AtomicString, String>* CSSComputedStyleDeclaration::variableMap() const
3131 { 3131 {
3132 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3132 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3133 Node* styledNode = this->styledNode(); 3133 Node* styledNode = this->styledNode();
3134 if (!styledNode) 3134 if (!styledNode)
3135 return 0; 3135 return 0;
3136 RefPtr<RenderStyle> style = styledNode->computedStyle(styledNode->isPseudoEl ement() ? NOPSEUDO : m_pseudoElementSpecifier); 3136 RefPtr<RenderStyle> style = styledNode->computedStyle(styledNode->isPseudoEl ement() ? NOPSEUDO : m_pseudoElementSpecifier);
3137 if (!style) 3137 if (!style)
(...skipping 15 matching lines...) Expand all
3153 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3153 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3154 const HashMap<AtomicString, String>* variables = variableMap(); 3154 const HashMap<AtomicString, String>* variables = variableMap();
3155 if (!variables) 3155 if (!variables)
3156 return emptyString(); 3156 return emptyString();
3157 HashMap<AtomicString, String>::const_iterator it = variables->find(name); 3157 HashMap<AtomicString, String>::const_iterator it = variables->find(name);
3158 if (it == variables->end()) 3158 if (it == variables->end())
3159 return emptyString(); 3159 return emptyString();
3160 return it->value; 3160 return it->value;
3161 } 3161 }
3162 3162
3163 bool CSSComputedStyleDeclaration::setVariableValue(const AtomicString& name, con st String&, ExceptionState& es) 3163 bool CSSComputedStyleDeclaration::setVariableValue(const AtomicString& name, con st String&, ExceptionState& exceptionState)
3164 { 3164 {
3165 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3165 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3166 es.throwDOMException(NoModificationAllowedError, "Failed to set the '" + nam e + "' property on a computed 'CSSStyleDeclaration': computed styles are read-on ly."); 3166 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to set the '" + name + "' property on a computed 'CSSStyleDeclaration': computed styles are read-only.");
3167 return false; 3167 return false;
3168 } 3168 }
3169 3169
3170 bool CSSComputedStyleDeclaration::removeVariable(const AtomicString&) 3170 bool CSSComputedStyleDeclaration::removeVariable(const AtomicString&)
3171 { 3171 {
3172 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3172 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3173 return false; 3173 return false;
3174 } 3174 }
3175 3175
3176 bool CSSComputedStyleDeclaration::clearVariables(ExceptionState& es) 3176 bool CSSComputedStyleDeclaration::clearVariables(ExceptionState& exceptionState)
3177 { 3177 {
3178 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3178 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3179 es.throwDOMException(NoModificationAllowedError, "Failed to clear variables from a computed 'CSSStyleDeclaration': computed styles are read-only."); 3179 exceptionState.throwDOMException(NoModificationAllowedError, "Failed to clea r variables from a computed 'CSSStyleDeclaration': computed styles are read-only .");
3180 return false; 3180 return false;
3181 } 3181 }
3182 3182
3183 CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesI terator(const HashMap<AtomicString, String>* variables) 3183 CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesI terator(const HashMap<AtomicString, String>* variables)
3184 : m_active(variables) 3184 : m_active(variables)
3185 { 3185 {
3186 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); 3186 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
3187 if (m_active) { 3187 if (m_active) {
3188 m_it = variables->begin(); 3188 m_it = variables->begin();
3189 m_end = variables->end(); 3189 m_end = variables->end();
(...skipping 27 matching lines...) Expand all
3217 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3217 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3218 CSSPropertyB ackgroundClip }; 3218 CSSPropertyB ackgroundClip };
3219 3219
3220 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3220 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3221 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3221 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3222 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3222 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3223 return list.release(); 3223 return list.release();
3224 } 3224 }
3225 3225
3226 } // namespace WebCore 3226 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/AnimatableStrokeDasharrayListTest.cpp ('k') | Source/core/css/CSSGroupingRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698