| 
 | 
 | 
 Chromium Code Reviews
 Chromium Code Reviews Issue 
            2285473002:
    Fold SMIL animation value application helpers and simplify  (Closed)
    
  
    Issue 
            2285473002:
    Fold SMIL animation value application helpers and simplify  (Closed) 
  | Created: 4 years, 3 months ago by fs Modified: 4 years, 3 months ago Reviewers: pdr. CC: fs, darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, krit, Eric Willigers, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans Target Ref: refs/pending/heads/master Project: chromium Visibility: Public. | DescriptionFold SMIL animation value application helpers and simplify
Folds the following helper functions:
  applyCSSPropertyToTargetAndInstances
  removeCSSPropertyFromTargetAndInstances
  notifyTargetAndInstancesAboutAnimValChange
into their users, hoisting common predicates and simplifies
accordingly.
BUG=640676
Committed: https://crrev.com/cfa5adc96879fea39db27d190261e82ae3b85624
Cr-Commit-Position: refs/heads/master@{#414808}
   Patch Set 1 #Patch Set 2 : *facepalm* #
      Total comments: 2
      
     
 Depends on Patchset: Messages
    Total messages: 16 (9 generated)
     
 The CQ bit was checked by fs@opera.com to run a CQ dry run 
 Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 The CQ bit was checked by fs@opera.com to run a CQ dry run 
 Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 fs@opera.com changed reviewers: + pdr@chromium.org 
 
 The CQ bit was unchecked by commit-bot@chromium.org 
 Dry run: This issue passed the CQ dry run. 
 Much simpler! Just a small suggestion https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp (right): https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp:243: if (targetIsUsable(targetElement, attributeName())) The attribute check is sort of unrelated to whether the target is usable. WDYT of pulling "attribute != anyQName()" out and relying on shouldApply which has a similar check? Something like: if (shouldApply != DontApplyAnimation && targetIsUsable(targetElement)) ... 
 https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp (right): https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp:243: if (targetIsUsable(targetElement, attributeName())) On 2016/08/26 at 01:28:12, pdr. wrote: > The attribute check is sort of unrelated to whether the target is usable. WDYT of pulling "attribute != anyQName()" out and relying on shouldApply which has a similar check? > > Something like: > if (shouldApply != DontApplyAnimation && targetIsUsable(targetElement)) > ... Well, we could make that "shouldApply != DontApplyAnimation && targetElement->parentNode()" even (shouldApplyAnimation checks inActiveDocument too), but technically speaking it's a behavioral change. I'd be happy to do this as a follow up though (probably by merging targetIsUsable into shouldApplyAnimation and replace checks with the first part of the conjunction above.) (In general I consider "target" in this context to be the <element, attribute> pair.) 
 On 2016/08/26 at 08:45:27, fs wrote: > https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp (right): > > https://codereview.chromium.org/2285473002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp:243: if (targetIsUsable(targetElement, attributeName())) > On 2016/08/26 at 01:28:12, pdr. wrote: > > The attribute check is sort of unrelated to whether the target is usable. WDYT of pulling "attribute != anyQName()" out and relying on shouldApply which has a similar check? > > > > Something like: > > if (shouldApply != DontApplyAnimation && targetIsUsable(targetElement)) > > ... > > Well, we could make that "shouldApply != DontApplyAnimation && targetElement->parentNode()" even (shouldApplyAnimation checks inActiveDocument too), but technically speaking it's a behavioral change. I'd be happy to do this as a follow up though (probably by merging targetIsUsable into shouldApplyAnimation and replace checks with the first part of the conjunction above.) > > (In general I consider "target" in this context to be the <element, attribute> pair.) OK LGTM 
 The CQ bit was checked by fs@opera.com 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 
            
              
                Message was sent while issue was closed.
              
            
             Committed patchset #2 (id:20001) 
 
            
              
                Message was sent while issue was closed.
              
            
             Description was changed from ========== Fold SMIL animation value application helpers and simplify Folds the following helper functions: applyCSSPropertyToTargetAndInstances removeCSSPropertyFromTargetAndInstances notifyTargetAndInstancesAboutAnimValChange into their users, hoisting common predicates and simplifies accordingly. BUG=640676 ========== to ========== Fold SMIL animation value application helpers and simplify Folds the following helper functions: applyCSSPropertyToTargetAndInstances removeCSSPropertyFromTargetAndInstances notifyTargetAndInstancesAboutAnimValChange into their users, hoisting common predicates and simplifies accordingly. BUG=640676 Committed: https://crrev.com/cfa5adc96879fea39db27d190261e82ae3b85624 Cr-Commit-Position: refs/heads/master@{#414808} ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             Patchset 2 (id:??) landed as https://crrev.com/cfa5adc96879fea39db27d190261e82ae3b85624 Cr-Commit-Position: refs/heads/master@{#414808} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
