{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/131","labels_url":"https://api.github.com/repos/scrapinghub/splash/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/splash/issues/131/comments","events_url":"https://api.github.com/repos/scrapinghub/splash/issues/131/events","html_url":"https://github.com/scrapinghub/splash/pull/131","id":51549480,"number":131,"title":"[WIP] Web view geometry inheritance revisited.","user":{"login":"sardok","id":81914,"avatar_url":"https://avatars.githubusercontent.com/u/81914?v=3","gravatar_id":"","url":"https://api.github.com/users/sardok","html_url":"https://github.com/sardok","followers_url":"https://api.github.com/users/sardok/followers","following_url":"https://api.github.com/users/sardok/following{/other_user}","gists_url":"https://api.github.com/users/sardok/gists{/gist_id}","starred_url":"https://api.github.com/users/sardok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sardok/subscriptions","organizations_url":"https://api.github.com/users/sardok/orgs","repos_url":"https://api.github.com/users/sardok/repos","events_url":"https://api.github.com/users/sardok/events{/privacy}","received_events_url":"https://api.github.com/users/sardok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"immerrr","id":579798,"avatar_url":"https://avatars.githubusercontent.com/u/579798?v=3","gravatar_id":"","url":"https://api.github.com/users/immerrr","html_url":"https://github.com/immerrr","followers_url":"https://api.github.com/users/immerrr/followers","following_url":"https://api.github.com/users/immerrr/following{/other_user}","gists_url":"https://api.github.com/users/immerrr/gists{/gist_id}","starred_url":"https://api.github.com/users/immerrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immerrr/subscriptions","organizations_url":"https://api.github.com/users/immerrr/orgs","repos_url":"https://api.github.com/users/immerrr/repos","events_url":"https://api.github.com/users/immerrr/events{/privacy}","received_events_url":"https://api.github.com/users/immerrr/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2014-12-10T11:51:18Z","updated_at":"2015-01-17T17:37:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scrapinghub/splash/pulls/131","html_url":"https://github.com/scrapinghub/splash/pull/131","diff_url":"https://github.com/scrapinghub/splash/pull/131.diff","patch_url":"https://github.com/scrapinghub/splash/pull/131.patch"},"body":"I tried to bring the notion of different device screen option which allows you to render the page as though the webpage is visited from a particular screen sized device.\r\n\r\nThe motivation:\r\nI've come across with a website which dynamically changes its content and hides some of information if the device is smaller than a desktop. QWebPage inherits screen geometry information from QWebView (which does the same from QWidget most probably). So far, the geometry run at default value (640x480 if i'm not wrong). This PR, make QWebPage to set geometry immediate after it is created, i didnt test the effect changing the geometry at runtime and what happens to QWebPage.\r\n\r\nThis PR brings a simple unit test which expects a screen width to be a default value. I added custom yield_fixtures, having thinking to run TestServer() with different settings object which should be carried down to the WebpageRender. Now, there is no way to write test which uses different settings/configuration unless defaults.py is physically changed on disk.\r\n\r\nSo, do you think, is there a need for small refactoring about about running server at different configuration or is it better to look for an update which allows you to change the geometry (device screen size) at runtime, based on a url parameter for example?"},"comment":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/comments/70375854","html_url":"https://github.com/scrapinghub/splash/pull/131#issuecomment-70375854","issue_url":"https://api.github.com/repos/scrapinghub/splash/issues/131","id":70375854,"user":{"login":"kmike","id":107893,"avatar_url":"https://avatars.githubusercontent.com/u/107893?v=3","gravatar_id":"","url":"https://api.github.com/users/kmike","html_url":"https://github.com/kmike","followers_url":"https://api.github.com/users/kmike/followers","following_url":"https://api.github.com/users/kmike/following{/other_user}","gists_url":"https://api.github.com/users/kmike/gists{/gist_id}","starred_url":"https://api.github.com/users/kmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmike/subscriptions","organizations_url":"https://api.github.com/users/kmike/orgs","repos_url":"https://api.github.com/users/kmike/repos","events_url":"https://api.github.com/users/kmike/events{/privacy}","received_events_url":"https://api.github.com/users/kmike/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T17:37:46Z","updated_at":"2015-01-17T17:37:46Z","body":"@immerrr there are other possible changes in this direction (e.g. allowing clip rects), but what you've outlined looks like a good start.\r\n\r\n> default/fallback sizes should be provided for window, not viewport\r\n\r\nDo we need a \"fallback\" size, what is it?\r\n\r\n> provide set_window_size function to Lua runtime\r\n\r\nIt'd great to check if a webpage adapts to a new size immediately or not. If not, we should decide whether splash:set_window_size should be async or should we document that webpages could need some time to adapt to the new size. "}}