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

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

Issue 2323633002: Implement animation tainted custom property values (Closed)
Patch Set: Rebased Created 4 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
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 r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal( 293 void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(
294 CSSPropertyID unresolvedProperty, 294 CSSPropertyID unresolvedProperty,
295 const String& customPropertyName, 295 const String& customPropertyName,
296 const String& value, 296 const String& value,
297 bool important, 297 bool important,
298 ExceptionState&) { 298 ExceptionState&) {
299 StyleAttributeMutationScope mutationScope(this); 299 StyleAttributeMutationScope mutationScope(this);
300 willMutate(); 300 willMutate();
301 301
302 bool changed = false; 302 bool changed = false;
303 if (unresolvedProperty == CSSPropertyVariable) 303 if (unresolvedProperty == CSSPropertyVariable) {
304 bool isAnimationTainted = isKeyframeStyle();
304 changed = propertySet().setProperty(AtomicString(customPropertyName), value, 305 changed = propertySet().setProperty(AtomicString(customPropertyName), value,
305 important, contextStyleSheet()); 306 important, contextStyleSheet(),
306 else 307 isAnimationTainted);
308 } else {
307 changed = propertySet().setProperty(unresolvedProperty, value, important, 309 changed = propertySet().setProperty(unresolvedProperty, value, important,
308 contextStyleSheet()); 310 contextStyleSheet());
311 }
309 312
310 didMutate(changed ? PropertyChanged : NoChanges); 313 didMutate(changed ? PropertyChanged : NoChanges);
311 314
312 if (!changed) 315 if (!changed)
313 return; 316 return;
314 317
315 Element* parent = parentElement(); 318 Element* parent = parentElement();
316 if (parent) 319 if (parent)
317 parent->document().styleEngine().attributeChangedForElement( 320 parent->document().styleEngine().attributeChangedForElement(
318 HTMLNames::styleAttr, *parent); 321 HTMLNames::styleAttr, *parent);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 return m_parentElement ? &m_parentElement->document().elementSheet() 395 return m_parentElement ? &m_parentElement->document().elementSheet()
393 : nullptr; 396 : nullptr;
394 } 397 }
395 398
396 DEFINE_TRACE(InlineCSSStyleDeclaration) { 399 DEFINE_TRACE(InlineCSSStyleDeclaration) {
397 visitor->trace(m_parentElement); 400 visitor->trace(m_parentElement);
398 AbstractPropertySetCSSStyleDeclaration::trace(visitor); 401 AbstractPropertySetCSSStyleDeclaration::trace(visitor);
399 } 402 }
400 403
401 } // namespace blink 404 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698