fix: use coordinate offsets in ShowAutofillPopup (#20232)
* fix: use coordinate offsets in ShowAutofillPopup * fix: silence coord int->float narrowing conversion Minor fix to silence clang-tidy warning about implicit range narrowing. Not a huge deal but the revision is also easier to read. clang-tidy: bugprone-narrowing-conversions
This commit is contained in:
		
					parent
					
						
							
								3f5833ce5d
							
						
					
				
			
			
				commit
				
					
						63f08fcdb0
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -47,13 +47,13 @@ void AutofillDriver::ShowAutofillPopup(
 | 
			
		|||
    auto* view = web_contents->web_contents()->GetMainFrame()->GetView();
 | 
			
		||||
    auto offset = view->GetViewBounds().origin() -
 | 
			
		||||
                  embedder_view->GetViewBounds().origin();
 | 
			
		||||
    popup_bounds.Offset(offset.x(), offset.y());
 | 
			
		||||
    popup_bounds.Offset(offset);
 | 
			
		||||
    embedder_frame_host = embedder->web_contents()->GetMainFrame();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  autofill_popup_->CreateView(render_frame_host_, embedder_frame_host, osr,
 | 
			
		||||
                              web_contents->owner_window()->content_view(),
 | 
			
		||||
                              bounds);
 | 
			
		||||
                              popup_bounds);
 | 
			
		||||
  autofill_popup_->SetItems(values, labels);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue