eric7/WebBrowser/WebBrowserPage.py

branch
eric7
changeset 8687
f671fd72dfb6
parent 8674
c868a9f4b37c
child 8692
9c72f9bc9d72
--- a/eric7/WebBrowser/WebBrowserPage.py	Fri Oct 15 17:46:03 2021 +0200
+++ b/eric7/WebBrowser/WebBrowserPage.py	Fri Oct 15 20:08:16 2021 +0200
@@ -9,7 +9,7 @@
 """
 
 from PyQt6.QtCore import (
-    pyqtSlot, pyqtSignal, QUrl, QUrlQuery, QTimer, QEventLoop, QPoint, QPointF
+    pyqtSlot, pyqtSignal, QUrl, QUrlQuery, QTimer, QEventLoop, QPoint
 )
 from PyQt6.QtGui import QDesktopServices
 from PyQt6.QtWebEngineCore import (
@@ -535,47 +535,6 @@
         """
         return not self.__badSite
     
-    ##################################################
-    ## Methods below implement compatibility functions
-    ##################################################
-    
-    if not hasattr(QWebEnginePage, "icon"):
-        def icon(self):
-            """
-            Public method to get the web site icon.
-            
-            @return web site icon
-            @rtype QIcon
-            """
-            return self.__view.icon()
-    
-    if not hasattr(QWebEnginePage, "scrollPosition"):
-        def scrollPosition(self):
-            """
-            Public method to get the scroll position of the web page.
-            
-            @return scroll position
-            @rtype QPointF
-            """
-            pos = self.execJavaScript(
-                "(function() {"
-                "var res = {"
-                "    x: 0,"
-                "    y: 0,"
-                "};"
-                "res.x = window.scrollX;"
-                "res.y = window.scrollY;"
-                "return res;"
-                "})()",
-                WebBrowserPage.SafeJsWorld
-            )
-            pos = (
-                QPointF(0.0, 0.0) if pos is None
-                else QPointF(pos["x"], pos["y"])
-            )
-            
-            return pos
-    
     #############################################################
     ## Methods below implement protocol handler related functions
     #############################################################

eric ide

mercurial