| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |