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

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

Issue 1649663002: Make CSS Animations responsive to changes to their keyframe offsets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/keyframes-style-declaration-updates-animation.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2012 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 CSSKeyframeRule::~CSSKeyframeRule() 43 CSSKeyframeRule::~CSSKeyframeRule()
44 { 44 {
45 #if !ENABLE(OILPAN) 45 #if !ENABLE(OILPAN)
46 if (m_propertiesCSSOMWrapper) 46 if (m_propertiesCSSOMWrapper)
47 m_propertiesCSSOMWrapper->clearParentRule(); 47 m_propertiesCSSOMWrapper->clearParentRule();
48 #endif 48 #endif
49 } 49 }
50 50
51 void CSSKeyframeRule::setKeyText(const String& keyText, ExceptionState& exceptio nState) 51 void CSSKeyframeRule::setKeyText(const String& keyText, ExceptionState& exceptio nState)
52 { 52 {
53 CSSStyleSheet::RuleMutationScope(this);
54
53 if (!m_keyframe->setKeyText(keyText)) 55 if (!m_keyframe->setKeyText(keyText))
54 exceptionState.throwDOMException(SyntaxError, "The key '" + keyText + "' is invalid and cannot be parsed"); 56 exceptionState.throwDOMException(SyntaxError, "The key '" + keyText + "' is invalid and cannot be parsed");
55 57
56 toCSSKeyframesRule(parentRule())->styleChanged(); 58 toCSSKeyframesRule(parentRule())->styleChanged();
57 } 59 }
58 60
59 CSSStyleDeclaration* CSSKeyframeRule::style() const 61 CSSStyleDeclaration* CSSKeyframeRule::style() const
60 { 62 {
61 if (!m_propertiesCSSOMWrapper) 63 if (!m_propertiesCSSOMWrapper)
62 m_propertiesCSSOMWrapper = KeyframeStyleRuleCSSStyleDeclaration::create( m_keyframe->mutableProperties(), const_cast<CSSKeyframeRule*>(this)); 64 m_propertiesCSSOMWrapper = KeyframeStyleRuleCSSStyleDeclaration::create( m_keyframe->mutableProperties(), const_cast<CSSKeyframeRule*>(this));
63 return m_propertiesCSSOMWrapper.get(); 65 return m_propertiesCSSOMWrapper.get();
64 } 66 }
65 67
66 void CSSKeyframeRule::reattach(StyleRuleBase*) 68 void CSSKeyframeRule::reattach(StyleRuleBase*)
67 { 69 {
68 // No need to reattach, the underlying data is shareable on mutation. 70 // No need to reattach, the underlying data is shareable on mutation.
69 ASSERT_NOT_REACHED(); 71 ASSERT_NOT_REACHED();
70 } 72 }
71 73
72 DEFINE_TRACE(CSSKeyframeRule) 74 DEFINE_TRACE(CSSKeyframeRule)
73 { 75 {
74 visitor->trace(m_keyframe); 76 visitor->trace(m_keyframe);
75 visitor->trace(m_propertiesCSSOMWrapper); 77 visitor->trace(m_propertiesCSSOMWrapper);
76 CSSRule::trace(visitor); 78 CSSRule::trace(visitor);
77 } 79 }
78 80
79 } // namespace blink 81 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/keyframes-style-declaration-updates-animation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698