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

Side by Side Diff: Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp

Issue 656693002: Don't count UseCounters in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | « no previous file | Source/bindings/core/v8/custom/V8ElementCustom.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) 2007-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 StringBuilder builder; 93 StringBuilder builder;
94 builder.reserveCapacity(length); 94 builder.reserveCapacity(length);
95 95
96 unsigned i = 0; 96 unsigned i = 0;
97 bool hasSeenDash = false; 97 bool hasSeenDash = false;
98 98
99 if (hasCSSPropertyNamePrefix(propertyName, "css")) { 99 if (hasCSSPropertyNamePrefix(propertyName, "css")) {
100 i += 3; 100 i += 3;
101 // getComputedStyle(elem).cssX is a non-standard behaviour 101 // getComputedStyle(elem).cssX is a non-standard behaviour
102 // Measure this behaviour as CSSXGetComputedStyleQueries. 102 // Measure this behaviour as CSSXGetComputedStyleQueries.
103 UseCounter::count(callingExecutionContext(isolate), UseCounter::CSSXGetC omputedStyleQueries); 103 UseCounter::countIfNotPrivateScript(isolate, callingExecutionContext(iso late), UseCounter::CSSXGetComputedStyleQueries);
104 } else if (hasCSSPropertyNamePrefix(propertyName, "webkit")) 104 } else if (hasCSSPropertyNamePrefix(propertyName, "webkit"))
105 builder.append('-'); 105 builder.append('-');
106 else if (isASCIIUpper(propertyName[0])) 106 else if (isASCIIUpper(propertyName[0]))
107 return CSSPropertyInvalid; 107 return CSSPropertyInvalid;
108 108
109 bool hasSeenUpper = isASCIIUpper(propertyName[i]); 109 bool hasSeenUpper = isASCIIUpper(propertyName[i]);
110 110
111 builder.append(toASCIILower(propertyName[i++])); 111 builder.append(toASCIILower(propertyName[i++]));
112 112
113 for (; i < length; ++i) { 113 for (; i < length; ++i) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 ExceptionState exceptionState(ExceptionState::SetterContext, getPropertyName (static_cast<CSSPropertyID>(propInfo->propID)), "CSSStyleDeclaration", info.Hold er(), info.GetIsolate()); 228 ExceptionState exceptionState(ExceptionState::SetterContext, getPropertyName (static_cast<CSSPropertyID>(propInfo->propID)), "CSSStyleDeclaration", info.Hold er(), info.GetIsolate());
229 impl->setPropertyInternal(static_cast<CSSPropertyID>(propInfo->propID), prop ertyValue, false, exceptionState); 229 impl->setPropertyInternal(static_cast<CSSPropertyID>(propInfo->propID), prop ertyValue, false, exceptionState);
230 230
231 if (exceptionState.throwIfNeeded()) 231 if (exceptionState.throwIfNeeded())
232 return; 232 return;
233 233
234 v8SetReturnValue(info, value); 234 v8SetReturnValue(info, value);
235 } 235 }
236 236
237 } // namespace blink 237 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/custom/V8ElementCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698