Changeset 222


Ignore:
Timestamp:
10/11/13 16:42:55 (6 years ago)
Author:
nhoyt
Message:

highlight.js

  • added images with letters v, w, m and p
  • added height: 100% to div styling
  • added tagName parameters back into insertDIV
  • reinstated algorithm that uses two methods for inserting div element depending on tag name

ai-sidebar.dtd

  • changed Passed to Passes

install.rdf

  • updated version number to 0.14.3
Location:
trunk/proto-14
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/proto-14/chrome/content/highlight/highlight.js

    r221 r222  
    2323    this.highlightDivClass = properties.highlightDivClass; 
    2424    this.offScreenDivClass = properties.offScreenDivClass; 
    25  
    26     this.infoImageBase64_v = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB/0lEQVQ4EZVTPUscURQ9782o+xFdJypqwDXRQhZhYSFFgo0ajKSxCGqZNIIghEDsLUwqAzaCJOIHIRCCCKIWghB/gZUQtkkEJ0GJmI91N9XszMu7Vx2fu9vkFTP3nXvOfTPv3CuUUjCX29rfXfSLYxp+CIEk5xRcIbBjW/Zi8nj3s8kXYYG741Vf3eysBiZ0SWmSYoM9sJocFFZ3AuV5853J1AvsvfWIc15Aiw8Os9sK6oEppDg2cB+tH2YY/jWzjN+vV/SHiU8d7alHVIRPopMriUklb8RYzHE8yjFxSUMbcdjS110sevuln81MekiJ2tFByJsJ5N9vIcj/5ZQAAtuuStt8YSX/HIopCALkP25fg2hDB5JW8m2XpQG7rQXNS9O4nd1Ew8tnFRi6iHZKhlYZlMi9NG5tzKEm3QWr0UFifATSqTMYF6G2+Zpdl4y6J0M4evwcyvcZ8n/8RJArXKav3roHpP4Z9wo5j04mXiGSSaG6s42B3MIa30UpT3vwTVKHlSU06Ew+Zdg/KyC3sl5GIYC0ktqTLDEZ8aFeVHfdYejs3Qashnq20eSwjVorqbeVEPNmMjE2HG4tJ4HmN1MQUkuMRRrS8iVSb1N7hnntPS2eE0vieHQS/umfME1cngeNVBwmxKMy2pOB98WFd/DdECKgk8uHKaQA/zvO/wBgR8uEKzUvKwAAAABJRU5ErkJggg=="; 
    27  
    28     this.infoImageBase64_w = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABtElEQVQ4EZVTu0pDQRA9e2N8kaBiTGEhIhFEwc5SEAQRxM42nVgINvbiHyg2ETGFIFb+gehPCGIgVkmhBJQbYhPCveuZ3Y13k9g4JHdnZ848dh5Ka40eelMriLAPjS3K55yuBoUHpFBGQb/4eJU4UGlUcEbgIY2DBKSAzC6QygOt2xhxu4QlHAO6YzDigL+0ruBRv5Lt/9d2CHHUOLV6wYoNPzaSRNbYTKJ6XJBNLkHG8oIVG5LSVcibn3vTTmyYOzBR5JEDwmsgblqlQkzV6pArmPdm31j4CGje9AtZAmbPYgdkpNqDlJ4HZu+BQgPInw/qRUJbxaK1yLrHOdzYOo1vCWD04QWebHV1hul/OsDv8f136pMHQE1qSgdC0QeNQ8v7XwUtDmq+zPDvRWB0jdEXrerrgqdz5oM16oGZMF9oePrNnVhpxKqHlwMII+B0BmY8pSU+ZfeAkWUrCa9sC6WNPtk2lgMz2xolX4epo+SammZB73jvK5fYcC+sVGZb4SmxcglJ9WWQ6tssAdvZJcGafZBJNCDReMuksgHGN4B2BehUu2aE8KkS2Vsmz4HD/XOdfwBQP7L7iGD+vQAAAABJRU5ErkJggg=="; 
    29  
    30     this.infoImageBase64_mc = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB2klEQVQ4EZVTPUsDQRB9exe/MIdizmAhEgUbRcUipSAERBA723RiIQhiL/4Do40ipgtW/gPRn5D4AYJwlYogUdGghUGT9e3e7XlnKgeSm515b/bt7KyQUiJqQlyOA41lQMwxPhTk7gB5AthFKaeuY3hTQAi0AefbTK4SbBkQ41hc7EE6nUCp9Nqs1+UeML3Bfb80xi8gSa6cAmXKif8WFjxCfNvaegjyCivbGEWwk9pZ5syu0a/j2OEymTS+wmq1oMALnrl5FZUdMujY5OTzfXDdBA4Pn1GrNYO0oGNNskC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08waXBSBusBimDNTFys7EymcloM998+Y3j04QVCI9CrIJsxMhOSCgZSszMAzp3RqqogzgMAAAAASUVORK5CYII="; 
    33  
    34     this.infoImageBase64 = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByklEQVQ4EZVTvWoCQRCeW5JCC386GwNWItGIrdpIQExlpb0QEFIo5glELCWdgnD4ABaihUYEO58gmgfQ2IqNVgdn5lvcY6M2WTh29vuZnb2dNU6nE+kjnU4/2rb9yljWMIwHcKzZ8DQTQpiLxeIbmBqGSlAul++Xy+UHE2/8CSXAzEnJ7/fTdDq1LcvqxGKx9263a4GTCWBerVafnOwZoD6SySS1Wi0JmaZJvV6PuLJ5NBp9QRK5E3a+ZYbL7XY7+Vwul4yhPVdLRiqVwpm/mPlTtnLxuSmXy5HP56PRaETH41FRNnNPd+cfdtMMJfM0mUyUSZ8FvDBmdVTFgUCAms0mjcdjqlarCr6cs0Jdlc7E43Fqt9sUDofl3y8Wi+TxeHSJjOG9WXo+n6dKpSLLh3K329HhcLhKwMBJ8B/dXDKNRoMikQgFg0FJ9ft9J5muZe8PKpjpIGIujUqlkoSx82AwuJSoNbpTmLyyFYI5k8lQKBSS0HA4lFfo9Xp1CWJcoynOvd3R2UKh4CxhrNfrxGIHOwcdeCWK3uay50qBu8fgM0pjrVaj/X6vaNnK8AC4+Zi4fUUikaD1ek3b7dYxcoDM149JV/z3Of8CSFrKn7VA+jwAAAAASUVORK5CYII="; 
    3525 
    3626    this.show_element_manual_check = true; 
     
    5040    }; 
    5141 
    52     var containerDiv = 'border-collapse: separate; padding: 2px; position: relative; '; 
     42    var containerDiv = 'height: 100%; border-collapse: separate; padding: 2px; position: relative; '; 
    5343    var fixedPosDiv  = 'border-collapse: separate; '; 
    5444 
     
    6959                    'width: 16px; height: 16px' 
    7060    }; 
     61 
     62    this.elementsWithoutContent = [ 
     63      'applet', 'area', 'dl', 'embed', 'frame', 'img', 'input', 
     64      'object', 'ol', 'select', 'textarea', 'table', 'ul' 
     65    ]; 
     66 
     67    this.infoImageBase64_v = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB2klEQVQ4EZVTyytEURj/nTt3iAkL8khGjI1HFsiKKRQpW/+BiNhYS0pWSl4pslOyVJJSJknZ2JhGUx5ThlLyKBmaO+Me33fm4ZrRxF3c853f9/t955zvIaSUsH7Bss766Gd0gOBuCDiVTyIoBPZ1m77uvPecW/kiGaBlyH4d9M8RMEIhNSspYQvAlEKsuJy14zhdjTAeC0DiwI1/T0J2JciZVgFxUF1Z28tB1El88l/FHJi5rGFb3JR21EejEa/12mVbs7CVFOGuZxAw1E1ROD2GnLYmvCxsILTtofTA1HV7o6YSlvJmaUpkN9TAXlXOhyCL7IKhfmj5DrzvHSuMD2StprKtoO+f4btUmyxXhVoLJ4chqAxPUyuQYSNJZK2WLFUSBsLnV2pnr3Eip70ZuR2t+Dg5Q2jn0MIik8qs/0RiO8MXD1BdAUdvO6Rp4nFiMZ1KPaBTSoPkqbN6I4E7mKEPOPrcsBXk4XVzF4b3wkqJ2+JW4w5L89DjDH9Aic23dzzPrKVRGGCtxu3JJUllhOOJfJnfwOfDc6o7VkbWcitfF7uXIOVoGisTIMSy6+FoTHUi9za3Zya+1cdcNQ8ExoaGelr1NkX97TkJsfIRJzEHjH9PY5z133H+AoP7xxWGaaVLAAAAAElFTkSuQmCC"; 
     68 
     69    this.infoImageBase64_w = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABrklEQVQ4Ea1Tu0pDQRA9u3mgicYHCgo+UvhCCxv/QHz9hYU2wTTiB1iKhSBGKz/APxCEVJY2igoRrGJtBPGBRLOeubMbY6EYcJrduTPnzJm5s8Y5h292a6bwgRU4zPP7kI+VYXCCGA4x4q4b880XgUmghB0m5gi2jUn1u0GNsQNMYB1wVfnuCQi+wTGDs/Xk3y4GRYxjSUi0klT+K1iIJVcwNAvpWWSL9WwC2XMg1h+5SFGQ+L1b6tsMM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FRNMAAAAASUVORK5CYII="; 
     72 
     73    this.infoImageBase64_p = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACL0lEQVQ4Ea1TTUhUURg998174+TYpEOjDYam9DMzbjSGoGgRWFK0aFEEtRaLqCAXrVq3NCIQDLNFELkoJAphShKKqDCaqBaJQmUhlDQyDpXNz+18d+bhG6gg6Fu8d+93zzn3+7tKaw2vdV442qGLpV6l0MOTFjlTwAfCUspnDafPXH/jxStXIHn5mFPIZQd0CScAbXlBK2tVUhYG7bpQ/1TfUF78RkDI+aXsOLTuXgH/ZaXUhLM6tE9EbIHJzV7y7k3b0Lf9ICZnp5BoasfW9THMLnzEufFBvM/MM0DdbTjAKd/YmukOhj1CHaZatsOde7BrYxJdzTHMLMzBYkES69oRa2rD2OvJMkir5NDTWzdtKRg9VTkLWOzqs9u49OgGamwHD09eoeAWBGw/fhR+8lRbuqh7RbzHoCsfcWyOtJrdted3zX+5kC+Hzl0oEKwgGTK5ltsq19sWbsYqpwaZb1ksfl8ybhFtqY9imTd/yS26UAi3KnQ5STBPsYbaECLBBrPeH9+JgONH+tNbkkhzjRvbDAl5ri9eEZD9wIF+PH73Eke69rLwmvUYdWHmz8DmLJkwrzfOtomdvz+CaGgtju84JLni7J2LeDU/44VSFClbxpPVPC1VVexkrHEDCqUi2/UAo+kUGuvCzDtTHbqR4VT61LAlsy3jKb7WcBS1/oAZGqm82Ofc19+Q2QFyhGuKKLPNOCciwXq8YKHuTT8x5D9+iDUcAv7PY/Le9K/P+Refku1NobDFbQAAAABJRU5ErkJggg=="; 
     74 
     75    this.infoImageBase64 = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByklEQVQ4EZVTvWoCQRCeW5JCC386GwNWItGIrdpIQExlpb0QEFIo5glELCWdgnD4ABaihUYEO58gmgfQ2IqNVgdn5lvcY6M2WTh29vuZnb2dNU6nE+kjnU4/2rb9yljWMIwHcKzZ8DQTQpiLxeIbmBqGSlAul++Xy+UHE2/8CSXAzEnJ7/fTdDq1LcvqxGKx9263a4GTCWBerVafnOwZoD6SySS1Wi0JmaZJvV6PuLJ5NBp9QRK5E3a+ZYbL7XY7+Vwul4yhPVdLRiqVwpm/mPlTtnLxuSmXy5HP56PRaETH41FRNnNPd+cfdtMMJfM0mUyUSZ8FvDBmdVTFgUCAms0mjcdjqlarCr6cs0Jdlc7E43Fqt9sUDofl3y8Wi+TxeHSJjOG9WXo+n6dKpSLLh3K329HhcLhKwMBJ8B/dXDKNRoMikQgFg0FJ9ft9J5muZe8PKpjpIGIujUqlkoSx82AwuJSoNbpTmLyyFYI5k8lQKBSS0HA4lFfo9Xp1CWJcoynOvd3R2UKh4CxhrNfrxGIHOwcdeCWK3uay50qBu8fgM0pjrVaj/X6vaNnK8AC4+Zi4fUUikaD1ek3b7dYxcoDM149JV/z3Of8CSFrKn7VA+jwAAAAASUVORK5CYII="; 
     76 
    7177  }, 
    7278 
     
    179185 
    180186      var computed_style = dom_element.computed_style; 
     187      var tag_name = dom_element.tag_name; 
    181188 
    182189      // The node property of DOMElement is a reference to the DOM node in 
     
    224231          switch (node_result.getResultValue()) { 
    225232            case RESULT_VALUE.VIOLATION: 
    226               this.insertDIV(document, node, this.STYLES.violations, 1, 0, 0, 0, 0); 
     233              this.insertDIV(document, node, tag_name, this.STYLES.violations, 1, 0, 0, 0, 0); 
    227234              break; 
    228235 
    229236            case RESULT_VALUE.WARNING: 
    230               this.insertDIV(document, node, this.STYLES.warnings, 0, 1, 0, 0, 0); 
     237              this.insertDIV(document, node, tag_name, this.STYLES.warnings, 0, 1, 0, 0, 0); 
    231238              break; 
    232239 
     
    236243              if (node_result.isScopePage() && !this.show_page_manual_check) 
    237244                continue; 
    238               this.insertDIV(document, node, this.STYLES.manualChecks, 0, 0, 1, 0, 0); 
     245              this.insertDIV(document, node, tag_name, this.STYLES.manualChecks, 0, 0, 1, 0, 0); 
    239246              break; 
    240247 
    241248            case RESULT_VALUE.PASS: 
    242249              if (this.show_pass) 
    243                 this.insertDIV(document, node, this.STYLES.passes, 0, 0, 0, 1, 0); 
     250                this.insertDIV(document, node, tag_name, this.STYLES.passes, 0, 0, 0, 1, 0); 
    244251              break; 
    245252 
    246253            case RESULT_VALUE.HIDDEN: 
    247254              if (this.show_hidden) 
    248                 this.insertDIV(document, node, this.STYLES.hidden, 0, 0, 0, 0, 1); 
     255                this.insertDIV(document, node, tag_name, this.STYLES.hidden, 0, 0, 0, 0, 1); 
    249256              break; 
    250257 
     
    470477   * @param {Object} document - the DOM that contains the node to highlight 
    471478   * @param {Object} node - the node to highlight 
     479   * @param {Object} tagName - tag name of the node 
    472480   * @param {String} style - CSS styling properties for DIV 
    473481   * @param {Number} v - violations 
     
    477485   * @param {Number} h - hidden 
    478486   */ 
    479   insertDIV: function (document, node, style, v, w, m, p, h) { 
     487  insertDIV: function (document, node, tagName, style, v, w, m, p, h) { 
    480488 
    481489    var parentNode = null; 
     
    492500    if (v > 0) imageData = this.infoImageBase64_v; 
    493501    else if (w > 0) imageData = this.infoImageBase64_w; 
    494     else if (m > 0) imageData = this.infoImageBase64_mc; 
     502    else if (m > 0) imageData = this.infoImageBase64_m; 
    495503    else if (p > 0) imageData = this.infoImageBase64_p; 
    496504 
     
    500508    iconImage.setAttribute("class", this.highlightDivClass); 
    501509    iconImage.setAttribute("style", this.STYLES.iconImage); 
    502      
    503     // Replace the node with the div containing the node and append image 
    504     parentNode = node.parentNode; 
    505     parentNode.insertBefore(divElement, node); 
    506     divElement.appendChild(node); 
     510 
     511    // Determine method of inserting div based on tagName 
     512    var index = this.elementsWithoutContent.indexOf(tagName); 
     513 
     514    if (index != -1) { // node is a member of elementsWithoutContent... 
     515      // In this method, the div becomes a container for the node itself; 
     516      // insert the div just before the node and then move the node 
     517      // into the div. 
     518      parentNode = node.parentNode; 
     519      parentNode.insertBefore(divElement, node); 
     520      divElement.appendChild(node); 
     521    } 
     522    else { // node may have content... 
     523      // In this method, the div becomes the container for all child elements 
     524      // of the node; move all of the node's children into the div and then 
     525      // insert the div as a child of the node. 
     526      while (node.firstChild) { 
     527        divElement.appendChild(node.firstChild); 
     528      } 
     529      node.appendChild(divElement); 
     530    } 
    507531    divElement.appendChild(iconImage); 
    508532 
  • trunk/proto-14/chrome/locale/en-US/ai-sidebar.dtd

    r215 r222  
    7676<!ENTITY ai-summary.tooltip.category  "Rule Category"> 
    7777<!ENTITY ai-summary.tooltip.guideline "WCAG Guideline"> 
    78 <!ENTITY ai-summary.tooltip.pass      "Passed"> 
     78<!ENTITY ai-summary.tooltip.pass      "Passes"> 
    7979<!ENTITY ai-summary.tooltip.viol      "Violations"> 
    8080<!ENTITY ai-summary.tooltip.warn      "Warnings"> 
  • trunk/proto-14/install.rdf

    r217 r222  
    1010        <em:name>AInspector Sidebar</em:name> 
    1111        <em:type>2</em:type> 
    12         <em:version>0.14.2</em:version> 
     12        <em:version>0.14.3</em:version> 
    1313 
    1414        <em:targetApplication> 
Note: See TracChangeset for help on using the changeset viewer.