[webkit-reviews] review requested: [Bug 60893] [Qt] tst_QWebFrame::render() failing : [Attachment 94208] Now it waits the content to be loaded before testing and make sure QPicture will expand if its painter is used to render.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 20 06:30:51 PDT 2011


Rafael Brandao <rafael.lobo at openbossa.org> has asked  for review:
Bug 60893: [Qt] tst_QWebFrame::render() failing
https://bugs.webkit.org/show_bug.cgi?id=60893

Attachment 94208: Now it waits the content to be loaded before testing and make
sure QPicture will expand if its painter is used to render.
https://bugs.webkit.org/attachment.cgi?id=94208&action=review

------- Additional Comments from Rafael Brandao <rafael.lobo at openbossa.org>
As this test uses a QPicture's painter to render the frame, its bounding rect
is supposed to grow as bigger the painting gets inside it. What was happening
here was a very strange behavior on its expanding policy. If you render stuff
without translating anything, things will work as expected. The issue works as
follows:

1. Set a clipping rect on the painter.
2. Fill it with a bigger rect and check the QPicture's bounding rect (it should
match the clipping rect).
3. Now set a clipping rect to be somewhere's else, so it would have to expand
when filled.
[ignore to make it work]
4. Translate to the top left point of this recently determined clipping rect.
Your clipping rect would be changed to the follow (0,0 WxH)
[/ignore]
5. Fill again with a bigger rect, and check if the QPicture's bounding rect is
increased as you would expect.

I don't know any other better way to explain this, so I've looked into
ScrollBarThemeQt::paint and realized it would paint the place where the
scrollbar should be with a background color before the actual scrollbar. So if
I paint this background color before the translation, the QPicture's bounding
rect would expand correctly, and the resulting painting would not change.


More information about the webkit-reviews mailing list