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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2379653002: Add a inner text parameter to ContextMenuParams (Closed)
Patch Set: 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
« no previous file with comments | « ios/web/web_state/js/resources/core.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ios/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4283 if (titleAttribute) 4283 if (titleAttribute)
4284 title = titleAttribute; 4284 title = titleAttribute;
4285 if (title) { 4285 if (title) {
4286 params.menu_title.reset([title copy]); 4286 params.menu_title.reset([title copy]);
4287 } 4287 }
4288 NSString* referrerPolicy = element[@"referrerPolicy"]; 4288 NSString* referrerPolicy = element[@"referrerPolicy"];
4289 if (referrerPolicy) { 4289 if (referrerPolicy) {
4290 params.referrer_policy = 4290 params.referrer_policy =
4291 web::ReferrerPolicyFromString(base::SysNSStringToUTF8(referrerPolicy)); 4291 web::ReferrerPolicyFromString(base::SysNSStringToUTF8(referrerPolicy));
4292 } 4292 }
4293 NSString* innerText = element[@"innerText"];
marq (ping after 24h) 2016/10/03 11:31:09 If the JS innerText value is an empty string, what
gambard 2016/10/03 12:05:52 The string can be empty or potentially nil (if the
4294 if (innerText) {
4295 params.inner_text.reset([innerText copy]);
4296 }
4293 return params; 4297 return params;
4294 } 4298 }
4295 4299
4296 #pragma mark - 4300 #pragma mark -
4297 #pragma mark Fullscreen 4301 #pragma mark Fullscreen
4298 4302
4299 - (CGRect)visibleFrame { 4303 - (CGRect)visibleFrame {
4300 CGRect frame = [_containerView bounds]; 4304 CGRect frame = [_containerView bounds];
4301 CGFloat headerHeight = [self headerHeight]; 4305 CGFloat headerHeight = [self headerHeight];
4302 frame.origin.y = headerHeight; 4306 frame.origin.y = headerHeight;
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
5629 } 5633 }
5630 5634
5631 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5635 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5632 } 5636 }
5633 5637
5634 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5638 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5635 return [action.request valueForHTTPHeaderField:@"Referer"]; 5639 return [action.request valueForHTTPHeaderField:@"Referer"];
5636 } 5640 }
5637 5641
5638 @end 5642 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/js/resources/core.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698