| 
        
       | 
      
        
  
  Add support for 'href' (w/o XLink NS) for various SVG elements
This CL adds a new wrapper type SVGAnimatedHref that wraps 'href' (the
new, null/default NS version) and '(xlink:)href' (the XLink NS version).
This wrapper type is used by SVGURIReference and thus most uses of
'href' is covered by this part. SVGAnimatedHref is intended as a wrapper
for accessing the underlying value of either 'href' or 'xlink:href'. Any
updates due to setAttribute or will go directly to the underlying values
which means that synchronization etc. does not apply to the wrapper.
This is one of the "pro"s of this approach - it does not require any
modification to synching between the SVGString object and the attribute
in certain cases (like when the "active" attribute is removed). A "con"
would be that there's a lot of dead space in the object since the
wrapper itself still needs to implement the SVGAnimatedString interface
even if just forwards to the actual SVGString.
The UseCounter for href.baseVal/animVal are moved to the new wrapper.
For cases where SVGURIReference is not used, new code-paths are added to
select the right attribute.
Animation code is updated to target the 'href' in the null/default NS.
BUG= 584142
Committed:  https://crrev.com/2f0b655515af2df03d41d4f894e0dd59d5cb6411
Cr-Commit-Position: refs/heads/master@{#375192}
    
  
  
  
  
   
  
  
  
    
      Total comments: 7
      
     
  
  
  
   
  
  
  
    
      Total comments: 5
      
     
  
  
  
   
  
  
  
  
  
   
  
  
  
    
      Total comments: 3
      
     
  
  
  
   
  
  
  
  
    
  
  
    
       | 
      Unified diffs | 
      Side-by-side diffs | 
      Delta from patch set | 
      Stats (+544 lines, -52 lines) | 
      Patch | 
     
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/svg-animate-href.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/svg-animate-href-expected.txt
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +2 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/svg-script-tag-href.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/svg-script-tag-href-expected.txt
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/image-href.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +4 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/image-href-expected.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +4 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns-expected.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          0 chunks | 
          +-1 lines, --1 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns-precedence.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +8 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns-precedence-dynamic.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +17 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns-precedence-dynamic-expected.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            third_party/WebKit/LayoutTests/svg/custom/use-href-null-ns-precedence-expected.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          0 chunks | 
          +-1 lines, --1 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/LayoutTests/svg/dom/href-semantics.html
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +137 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          4 chunks | 
          +1 line, -6 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
         | 
        
          3 chunks | 
          +2 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/core.gypi
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          1 chunk | 
          +2 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/dom/Element.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          3 chunks | 
          +2 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +2 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/Source/core/svg/SVGAnimatedHref.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +60 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            third_party/WebKit/Source/core/svg/SVGAnimatedHref.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +123 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGAnimatedString.h
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          2 chunks | 
          +4 lines, -4 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGAnimatedString.cpp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -11 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGAttributeNames.in
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          4 chunks | 
          +2 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGURIReference.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          4 chunks | 
          +12 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGURIReference.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          2 chunks | 
          +16 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/SVGUseElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
         | 
        
          1 chunk | 
          +1 line, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          8 chunks | 
          +117 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
          5
        
         | 
        
          3 chunks | 
          +16 lines, -9 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
   
  
  
 
  
   
  
    
  
  
  
    
    Total messages: 24 (7 generated)
     
  
  
       |