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

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

Issue 1508713003: Add deprecation message for CSSXGetComputedStyleQueries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review comments, fix affected tests Created 5 years 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) 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 StringBuilder builder; 89 StringBuilder builder;
90 builder.reserveCapacity(length); 90 builder.reserveCapacity(length);
91 91
92 unsigned i = 0; 92 unsigned i = 0;
93 bool hasSeenDash = false; 93 bool hasSeenDash = false;
94 94
95 if (hasCSSPropertyNamePrefix(propertyName, "css")) { 95 if (hasCSSPropertyNamePrefix(propertyName, "css")) {
96 i += 3; 96 i += 3;
97 // getComputedStyle(elem).cssX is a non-standard behaviour 97 // getComputedStyle(elem).cssX is a non-standard behaviour
98 // Measure this behaviour as CSSXGetComputedStyleQueries. 98 // Measure this behaviour as CSSXGetComputedStyleQueries.
99 UseCounter::countIfNotPrivateScript(isolate, callingExecutionContext(iso late), UseCounter::CSSXGetComputedStyleQueries); 99 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecution Context(isolate), UseCounter::CSSXGetComputedStyleQueries);
100 } else if (hasCSSPropertyNamePrefix(propertyName, "webkit")) 100 } else if (hasCSSPropertyNamePrefix(propertyName, "webkit"))
101 builder.append('-'); 101 builder.append('-');
102 else if (isASCIIUpper(propertyName[0])) 102 else if (isASCIIUpper(propertyName[0]))
103 return CSSPropertyInvalid; 103 return CSSPropertyInvalid;
104 104
105 bool hasSeenUpper = isASCIIUpper(propertyName[i]); 105 bool hasSeenUpper = isASCIIUpper(propertyName[i]);
106 106
107 builder.append(toASCIILower(propertyName[i++])); 107 builder.append(toASCIILower(propertyName[i++]));
108 108
109 for (; i < length; ++i) { 109 for (; i < length; ++i) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // TODO(leviw): This API doesn't support custom properties. 228 // TODO(leviw): This API doesn't support custom properties.
229 impl->setPropertyInternal(unresolvedProperty, String(), propertyValue, false , exceptionState); 229 impl->setPropertyInternal(unresolvedProperty, String(), propertyValue, 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

Powered by Google App Engine
This is Rietveld 408576698