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

Side by Side Diff: Source/core/css/CSSGroupingRule.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
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 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 9 * 1. Redistributions of source code must retain the above
10 * copyright notice, this list of conditions and the following 10 * copyright notice, this list of conditions and the following
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (index > m_groupRule->childRules().size()) { 66 if (index > m_groupRule->childRules().size()) {
67 // IndexSizeError: Raised if the specified index is not a valid insertio n point. 67 // IndexSizeError: Raised if the specified index is not a valid insertio n point.
68 ec = IndexSizeError; 68 ec = IndexSizeError;
69 return 0; 69 return 0;
70 } 70 }
71 71
72 CSSStyleSheet* styleSheet = parentStyleSheet(); 72 CSSStyleSheet* styleSheet = parentStyleSheet();
73 CSSParser parser(parserContext(), UseCounter::getFrom(styleSheet)); 73 CSSParser parser(parserContext(), UseCounter::getFrom(styleSheet));
74 RefPtr<StyleRuleBase> newRule = parser.parseRule(styleSheet ? styleSheet->co ntents() : 0, ruleString); 74 RefPtr<StyleRuleBase> newRule = parser.parseRule(styleSheet ? styleSheet->co ntents() : 0, ruleString);
75 if (!newRule) { 75 if (!newRule) {
76 // SYNTAX_ERR: Raised if the specified rule has a syntax error and is un parsable. 76 // SyntaxError: Raised if the specified rule has a syntax error and is u nparsable.
77 ec = SYNTAX_ERR; 77 ec = SyntaxError;
78 return 0; 78 return 0;
79 } 79 }
80 80
81 if (newRule->isImportRule()) { 81 if (newRule->isImportRule()) {
82 // FIXME: an HierarchyRequestError should also be thrown for a @charset or a nested 82 // FIXME: an HierarchyRequestError should also be thrown for a @charset or a nested
83 // @media rule. They are currently not getting parsed, resulting in a SY NTAX_ERR 83 // @media rule. They are currently not getting parsed, resulting in a Sy ntaxError
84 // to get raised above. 84 // to get raised above.
85 85
86 // HierarchyRequestError: Raised if the rule cannot be inserted at the s pecified 86 // HierarchyRequestError: Raised if the rule cannot be inserted at the s pecified
87 // index, e.g., if an @import rule is inserted after a standard rule set or other 87 // index, e.g., if an @import rule is inserted after a standard rule set or other
88 // at-rule. 88 // at-rule.
89 ec = HierarchyRequestError; 89 ec = HierarchyRequestError;
90 return 0; 90 return 0;
91 } 91 }
92 CSSStyleSheet::RuleMutationScope mutationScope(this); 92 CSSStyleSheet::RuleMutationScope mutationScope(this);
93 93
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void CSSGroupingRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons t 163 void CSSGroupingRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons t
164 { 164 {
165 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 165 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
166 CSSRule::reportMemoryUsage(memoryObjectInfo); 166 CSSRule::reportMemoryUsage(memoryObjectInfo);
167 info.addMember(m_groupRule, "groupRule"); 167 info.addMember(m_groupRule, "groupRule");
168 info.addMember(m_childRuleCSSOMWrappers, "childRuleCSSOMWrappers"); 168 info.addMember(m_childRuleCSSOMWrappers, "childRuleCSSOMWrappers");
169 info.addMember(m_ruleListCSSOMWrapper, "ruleListCSSOMWrapper"); 169 info.addMember(m_ruleListCSSOMWrapper, "ruleListCSSOMWrapper");
170 } 170 }
171 171
172 } // namespace WebCore 172 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698