Bug 60758

Summary: [Qt] SizeHint for QGraphicsWebView is hardcoded
Product: WebKit Reporter: Alberto Mardegan <mardy>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: benjamin, hausmann, joel.parks, jturcotte, kenneth, kling, vestbo
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Solution proposed by Palczewski Michał none

Alberto Mardegan
Reported 2011-05-13 05:06:31 PDT
Created attachment 93435 [details] Solution proposed by Palczewski Michał SizeHint for QGraphicsWebView shouldn't be hardcoded. Proposed solution in attachments. Because of this, the QGraphicsWebView is requesting a smaller size than what really needed, with the result that it breaks the resizeToContents functionality.
Attachments
Solution proposed by Palczewski Michał (779 bytes, patch)
2011-05-13 05:06 PDT, Alberto Mardegan
no flags
Benjamin Poulain
Comment 1 2011-05-13 05:14:21 PDT
On PMO, I suggested to close this as invalid with the following example: "Let's say I start from a width of 800 pixels. I go on a page that cannot be layouted with less than 10000 pixels. The content size it adjusted to 10000 pixels width, the layout takes that into account and create a huge view. Next, I go on amazon.com. Amazon has a flex layout. It adjusts itself to the current viewport size. Since the width is 10000, the content size will stay 10000 pixel wide for amazon and the layout will look really bad. Similar case can happen with different pages in the same site, you would see the view resize to whatever constraint is put by the page layout." Alberto wants to have the opinion of the team so here we are. What do you think guys?
Alberto Mardegan
Comment 2 2011-05-13 05:27:16 PDT
(Copying my reply from PMO too) (In reply to comment #1) > On PMO, I suggested to close this as invalid with the following example: > > "Let's say I start from a width of 800 pixels. I go on a page that cannot be > layouted with less than 10000 pixels. The content size it adjusted to 10000 > pixels width, the layout takes that into account and create a huge view. > Next, I go on amazon.com. Amazon has a flex layout. It adjusts itself to the > current viewport size. Since the width is 10000, the content size will stay > 10000 pixel wide for amazon and the layout will look really bad. This is a personal taste :-) Indeed I agree with you, but it IMHO it shouldn't be Qt's task to decide what looks good and what doesn't. If the application developer believes that this doesn't looks good, he should use an appropriate QSizePolicy on the layout containing the view. That's what QSizePolicy is for. If the rendered web content is 10000 pixels wide, I wouldn't expect sizeHint() to return anything less than that.
Jocelyn Turcotte
Comment 3 2014-02-03 03:17:47 PST
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.
Note You need to log in before you can comment on or make changes to this bug.