| 
        
       | 
      
        
  
  Make collection caching code more consistent
Make collection caching code more consistent by:
- Moving ensureCachedHTMLCollection() from Document and Element to
  ContainerNode and renaming it to ensureCachedCollection().
- Make ensureCachedCollection() templated to avoid if checks on the type in
  the implementation and to avoid casting the return value at the call sites.
- Use ensureCachedCollection() more consistently in the code base. Half the
  code was calling NodeListsNodeData::addCache<>() directly.
 R=esprehn@chromium.org,  adamk@chromium.org
Committed:  https://src.chromium.org/viewvc/blink?view=rev&revision=179267
   
  
  
  
  
   
  
  
  
  
  
   
  
  
  
  
  
   
  
  
  
    
      Total comments: 2
      
     
  
  
  
   
  
  
  
  
    
  
  
    
       | 
      Unified diffs | 
      Side-by-side diffs | 
      Delta from patch set | 
      Stats (+77 lines, -62 lines) | 
      Patch | 
     
    
      
          | 
        M | 
        
          
            Source/core/dom/ContainerNode.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +8 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/ContainerNode.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          4 chunks | 
          +12 lines, -7 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/Document.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          1 chunk | 
          +0 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/Document.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +10 lines, -15 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/Element.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          1 chunk | 
          +0 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/Element.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          1 chunk | 
          +0 lines, -23 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/dom/NodeListsNodeData.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          1 chunk | 
          +26 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLDataListElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLFieldSetElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLFormElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLMapElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLSelectElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          4 chunks | 
          +5 lines, -4 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLTableElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +3 lines, -2 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLTableRowElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/HTMLTableSectionElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
         | 
        
          2 chunks | 
          +2 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            Source/core/html/LabelableElement.cpp
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
         | 
        
          1 chunk | 
          +1 line, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
   
  
  
 
  
   
  
    
  
  
  
    
    Total messages: 11 (0 generated)
     
  
  
       |