mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:32:43 +00:00 
			
		
		
		
	LibWebView+Ladybird: Remove unused on_scroll_into_view callback
Leftover from 9624eca116
			
			
This commit is contained in:
		
							parent
							
								
									6032c06f6b
								
							
						
					
					
						commit
						d87f3a4101
					
				
					 4 changed files with 0 additions and 33 deletions
				
			
		|  | @ -47,24 +47,6 @@ WebViewBridge::WebViewBridge(Vector<Web::DevicePixelRect> screen_rects, float de | |||
|             on_scroll_to_point(position); | ||||
|     }; | ||||
| 
 | ||||
|     on_scroll_into_view = [this](auto rect) { | ||||
|         if (m_viewport_rect.contains(rect)) | ||||
|             return; | ||||
| 
 | ||||
|         auto position = m_viewport_rect.location(); | ||||
| 
 | ||||
|         if (rect.top() < m_viewport_rect.top()) { | ||||
|             position.set_y(rect.top()); | ||||
|         } else if (rect.top() > m_viewport_rect.top() && rect.bottom() > m_viewport_rect.bottom()) { | ||||
|             position.set_y(rect.bottom() - m_viewport_rect.height()); | ||||
|         } else { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         if (on_scroll_to_point) | ||||
|             on_scroll_to_point(position); | ||||
|     }; | ||||
| 
 | ||||
|     on_scroll_to_point = [this](auto position) { | ||||
|         if (on_scroll) | ||||
|             on_scroll(to_widget_position(position)); | ||||
|  |  | |||
|  | @ -99,16 +99,6 @@ WebContentView::WebContentView(WebContentOptions const& web_content_options, Str | |||
|         verticalScrollBar()->setValue(position.y()); | ||||
|     }; | ||||
| 
 | ||||
|     on_scroll_into_view = [this](auto rect) { | ||||
|         if (m_viewport_rect.contains(rect)) | ||||
|             return; | ||||
| 
 | ||||
|         if (rect.top() < m_viewport_rect.top()) | ||||
|             verticalScrollBar()->setValue(rect.top()); | ||||
|         else if (rect.top() > m_viewport_rect.top() && rect.bottom() > m_viewport_rect.bottom()) | ||||
|             verticalScrollBar()->setValue(rect.bottom() - m_viewport_rect.height()); | ||||
|     }; | ||||
| 
 | ||||
|     on_cursor_change = [this](auto cursor) { | ||||
|         update_cursor(cursor); | ||||
|     }; | ||||
|  |  | |||
|  | @ -56,10 +56,6 @@ OutOfProcessWebView::OutOfProcessWebView() | |||
|         vertical_scrollbar().set_value(position.y()); | ||||
|     }; | ||||
| 
 | ||||
|     on_scroll_into_view = [this](auto rect) { | ||||
|         scroll_into_view(rect, true, true); | ||||
|     }; | ||||
| 
 | ||||
|     on_cursor_change = [this](auto cursor) { | ||||
|         set_override_cursor(cursor); | ||||
|     }; | ||||
|  |  | |||
|  | @ -132,7 +132,6 @@ public: | |||
|     Function<void(Gfx::Bitmap const&)> on_favicon_change; | ||||
|     Function<void(i32, i32)> on_scroll_by_delta; | ||||
|     Function<void(Gfx::IntPoint)> on_scroll_to_point; | ||||
|     Function<void(Gfx::IntRect)> on_scroll_into_view; | ||||
|     Function<void(Gfx::StandardCursor)> on_cursor_change; | ||||
|     Function<void(Gfx::IntPoint, ByteString const&)> on_enter_tooltip_area; | ||||
|     Function<void()> on_leave_tooltip_area; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aliaksandr Kalenik
						Aliaksandr Kalenik