Hi all, By Benjamin's request, I'd like to open discussion about an issue described in the bug https://bugs.webkit.org/show_bug.cgi?id=50311 .
The problem, that QWebFrame::render method always clips to viewport even if user app have specified its own clipping region. I've seen questions about this on #qtwebkit and there is at least one other bug report about the same issue: https://bugs.webkit.org/show_bug.cgi?id=38044 Originally there was QWebFrame::clipContentsToViewport API, which allowed switching clipping off. It was removed with intention to replace with better API, but new API always clips rendering to viewport. There is a way to do full content render with QWebElement::render of root element, but QWebElement::render doesn't take any clipping rect as parameter and for partial render of the content (not equal to the viewport) will invoke full traverse of render tree (quite big overhead on some pages) even if clipping was set on painter. Also, use of QWebElement::render looks a bit hackish in this case. My initial suggestion was to restore QWebFrame::clipContentsToViewport, but Kenneth didn't like this patch and I myself find it a bit odd. Another suggestion is to remove clipping to viewport if user have specified clipping region. Benjamin commented, that "It will be rather strange to render the full page while still having the scrollbar and so on". Based on all comments clean solution would be to remove viewport clipping if application only paints contents layer (layer == QWebFrame::ContentsLayer) and specified non-empty clipping region. This will preserve old behavior in case of viewport rendering and give some freedom if application needs to do something else. Any comments? Thanks, Sl
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
