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

Side by Side Diff: third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 2524303002: Emit console warning when element.animate() keyframe value fails to parse (Closed)
Patch Set: Review changes Created 4 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
4 * rights reserved. 4 * rights reserved.
5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 DISABLE_CFI_PERF 295 DISABLE_CFI_PERF
296 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal( 296 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(
297 CSSPropertyID unresolvedProperty, 297 CSSPropertyID unresolvedProperty,
298 const String& customPropertyName, 298 const String& customPropertyName,
299 const String& value, 299 const String& value,
300 bool important, 300 bool important,
301 ExceptionState&) { 301 ExceptionState&) {
302 StyleAttributeMutationScope mutationScope(this); 302 StyleAttributeMutationScope mutationScope(this);
303 willMutate(); 303 willMutate();
304 304
305 bool changed = false; 305 bool didChange = false;
306 if (unresolvedProperty == CSSPropertyVariable) { 306 if (unresolvedProperty == CSSPropertyVariable) {
307 bool isAnimationTainted = isKeyframeStyle(); 307 bool isAnimationTainted = isKeyframeStyle();
308 changed = propertySet().setProperty(AtomicString(customPropertyName), value, 308 didChange =
309 important, contextStyleSheet(), 309 propertySet()
310 isAnimationTainted); 310 .setProperty(AtomicString(customPropertyName), value, important,
311 contextStyleSheet(), isAnimationTainted)
312 .didChange;
311 } else { 313 } else {
312 changed = propertySet().setProperty(unresolvedProperty, value, important, 314 didChange = propertySet()
313 contextStyleSheet()); 315 .setProperty(unresolvedProperty, value, important,
316 contextStyleSheet())
317 .didChange;
314 } 318 }
315 319
316 didMutate(changed ? PropertyChanged : NoChanges); 320 didMutate(didChange ? PropertyChanged : NoChanges);
317 321
318 if (!changed) 322 if (!didChange)
319 return; 323 return;
320 324
321 Element* parent = parentElement(); 325 Element* parent = parentElement();
322 if (parent) 326 if (parent)
323 parent->document().styleEngine().attributeChangedForElement( 327 parent->document().styleEngine().attributeChangedForElement(
324 HTMLNames::styleAttr, *parent); 328 HTMLNames::styleAttr, *parent);
325 mutationScope.enqueueMutationRecord(); 329 mutationScope.enqueueMutationRecord();
326 } 330 }
327 331
328 DISABLE_CFI_PERF 332 DISABLE_CFI_PERF
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return m_parentElement ? &m_parentElement->document().elementSheet() 403 return m_parentElement ? &m_parentElement->document().elementSheet()
400 : nullptr; 404 : nullptr;
401 } 405 }
402 406
403 DEFINE_TRACE(InlineCSSStyleDeclaration) { 407 DEFINE_TRACE(InlineCSSStyleDeclaration) {
404 visitor->trace(m_parentElement); 408 visitor->trace(m_parentElement);
405 AbstractPropertySetCSSStyleDeclaration::trace(visitor); 409 AbstractPropertySetCSSStyleDeclaration::trace(visitor);
406 } 410 }
407 411
408 } // namespace blink 412 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/DOMWindowCSS.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698