summaryrefslogtreecommitdiffstats
path: root/src/core/favicon_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix handling of touch icons when it is disabledPeter Varga2019-02-251-6/+14
| | | | | | | | | | | | | | | | Store the icon type in a bitfield because the same icon URL might be used for various types on same page. This way webengine won't ignore to download a default icon what is also set as a touch icon when touch icons are disabled. Moreover, do not store the icon types from the previous page because a subsequent page might use the same icon URL but with different type. With this change the type of the cached icons are updated after each page load. Fixes: QTBUG-70081 Change-Id: I8031a740b07b0c6a8e5759a994f386b13ce87be2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Set a maximum size on faviconsJüri Valdmann2018-09-241-1/+2
| | | | | | | | | | | Favicons are downloaded by the render process and sent back via mojo message. However, mojo messages have a maximum size; if the favicon doesn't fit, the render process is killed. Impose a maximum size to ensure that favicons can fit in mojo messages. Task-number: QTBUG-69123 Change-Id: I6027bc310dcc77ec530145e4f125efa36106464f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Reduce boilerplate code for FaviconManagerMichal Klocek2018-05-171-44/+24
| | | | | | | | | Remove private implementation for FaviconManager Make FaviconManager non QObject since there no reason to do so. Change-Id: I8e341f9bd2dbc6f3fa977693383bbbf7349ab0b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add data URL handling to FaviconManagerPeter Varga2018-01-101-3/+20
| | | | | | | | | | | | Favicons passed in data URL now are converted directly to QImage in FaviconManager (Browser Process). Without this improvement content::WebContents::DownloadImage() handled the data URL, Render Process did the conversion and FaviconManager had to convert the resulted SkBitmap to QImage. Change-Id: Ie216b1d09fa4e1000297b1bd71c35aed70d968b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace ASSERT in FaviconManager::setIcon by returnViktor Engelmann2017-01-051-3/+1
| | | | | | | | | | | | | The ASSERT in FaviconManager::setIcon can be triggered by what seems to be a race condition. Apparently the old request can be gone (so m_inProgressRequests.contains(id) is false), but m_inProgressRequests can still be non-empty, because of a new request to the same URL, so this case is not covered by checking m_inProgressRequests.isEmpty() before. Task-number: QTBUG-57900 Change-Id: I2f26c05e5c97e4bd8d1cea03e8005cf61f2b0c98 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Combine candidate icons for a page into a single iconPeter Varga2016-05-041-29/+80
| | | | | | | | | | | | For the Widget API the QIcon returned by QWebEnginePage::icon() function contains all the candidate icons for the current page. For the Quick API the QQuickWebEngineFaviconProvider provides the best quality icon for the requested size from the candidates. Task-number: QTBUG-51179 Change-Id: I42b8427f957e2f2fc745dd0111bedcc71b577216 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add QQuickWebEngineFaviconProviderPeter Varga2016-04-201-0/+4
| | | | | | | | | The new QQuickImageProvider subclass is used to access downloaded icons from the FaviconManager via the Quick API. Change-Id: I6a52d3c737b2260cf480167764a931915cd99cab Task-number: QTBUG-51179 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add settings for FaviconManager's icon download modesPeter Varga2016-03-251-2/+14
| | | | | | Change-Id: I8e4b11089de29623ed39ec6b13fe30be734baa3e Task-number: QTBUG-51179 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Clean up FaviconManager and fix icon url in NavigationEntryPeter Varga2016-03-111-117/+66
| | | | | | Change-Id: I56a109c9071ef581c6a51b5b7b8ce5a2464c6a76 Task-number: QTBUG-51179 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Optimize FaviconManager related iterationsPeter Varga2016-02-091-11/+14
| | | | | | | | | - Replace foreach with for - Fix expensive iteration over QMap::keys() and QMap::values() Change-Id: Ia7f6803af7f5e609ec57bc4115bec17f43668937 Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Add FaviconManager to corePeter Varga2016-02-031-0/+390
The new icon manager uses the WebContents::DownloadImage() API for downloading icons. It proposes the best quality among the available favicons via the iconChanged signal. Change-Id: I66a014365b6f6560ff34d40ee870aee84e4e70e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>