Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Side by Side Diff: ios/web/web_state/js/resources/core.js

Issue 2379653002: Add a inner text parameter to ContextMenuParams (Closed)
Patch Set: Rename inner_text to link_text Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ios/web/public/web_state/context_menu_params.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698