OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file adheres to closure-compiler conventions in order to enable | 5 // This file adheres to closure-compiler conventions in order to enable |
6 // compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to | 6 // compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to |
7 // be accessed externally should be specified in this['style'] as opposed to | 7 // be accessed externally should be specified in this['style'] as opposed to |
8 // this.style because member identifiers are minified by default. | 8 // this.style because member identifiers are minified by default. |
9 // See http://goo.gl/FwOgy | 9 // See http://goo.gl/FwOgy |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 tagName === 'select' || tagName === 'option') { | 181 tagName === 'select' || tagName === 'option') { |
182 // If the element is a known input element, stop the spiral search and | 182 // If the element is a known input element, stop the spiral search and |
183 // return empty results. | 183 // return empty results. |
184 return {}; | 184 return {}; |
185 } | 185 } |
186 | 186 |
187 if (tagName === 'a' && element.href) { | 187 if (tagName === 'a' && element.href) { |
188 // Found a link. | 188 // Found a link. |
189 return { | 189 return { |
190 href: element.href, | 190 href: element.href, |
191 referrerPolicy: getReferrerPolicy_(element) | 191 referrerPolicy: getReferrerPolicy_(element), |
| 192 innerText: element.innerText |
192 }; | 193 }; |
193 } | 194 } |
194 | 195 |
195 if (tagName === 'img' && element.src) { | 196 if (tagName === 'img' && element.src) { |
196 // Found an image. | 197 // Found an image. |
197 var result = { | 198 var result = { |
198 src: element.src, | 199 src: element.src, |
199 referrerPolicy: getReferrerPolicy_() | 200 referrerPolicy: getReferrerPolicy_() |
200 }; | 201 }; |
201 // Copy the title, if any. | 202 // Copy the title, if any. |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 }); | 651 }); |
651 }, false); | 652 }, false); |
652 | 653 |
653 addFormEventListeners_(); | 654 addFormEventListeners_(); |
654 | 655 |
655 return true; | 656 return true; |
656 }; | 657 }; |
657 | 658 |
658 __gCrWeb.core.documentInject(); | 659 __gCrWeb.core.documentInject(); |
659 }()); // End of anonymous object | 660 }()); // End of anonymous object |
OLD | NEW |