OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |