WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
80313
MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles.
https://bugs.webkit.org/show_bug.cgi?id=80313
Summary
MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles.
Hugo Parente Lima
Reported
2012-03-05 12:15:36 PST
The problem can be reproduced with the HTML file above and "MiniBrowser --window-size 480x800": <html> <head></head> <style type="text/css"> div { height: 500px; background-color: grey; font-size: 72px; text-align: center; line-height: 500px; } div.odd { background-color: silver; } </style> <body> <div class="odd">Huge square 1/8</div> <div>Huge square 2/8</div> <div class="odd">Huge square 3/8</div> <div>Huge square 4/8</div> <div class="odd">Huge square 5/8</div> <div>Huge square 6/8</div> <div class="odd">Huge square 7/8</div> <div>Huge square 8/8</div> </body> </html>
Attachments
Patch
(1.96 KB, patch)
2012-03-05 12:24 PST
,
Hugo Parente Lima
no flags
Details
Formatted Diff
Diff
Patch
(4.32 KB, patch)
2012-03-06 10:42 PST
,
Hugo Parente Lima
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Hugo Parente Lima
Comment 1
2012-03-05 12:24:03 PST
Created
attachment 130181
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2012-03-05 14:45:58 PST
Comment on
attachment 130181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130181&action=review
> Source/WebKit2/ChangeLog:8 > + Map pageView boundingRect to the same coordinate system of webView boundingRect
I would just write "page view" and "web view", ie. use more natural language
> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:662 > - QRect alignedVisibleContentRect = visibleRectInCSSCoordinates.toAlignedRect(); > + const QRectF pageViewRectInCSSCoordinates = q->mapRectToWebContent(pageView->boundingRect()); > + const QRectF webViewRectInCSSCoordinates = q->mapRectToWebContent(q->boundingRect()); > + const QRect alignedVisibleContentRect(webViewRectInCSSCoordinates.intersected(pageViewRectInCSSCoordinates).toAlignedRect()); > +
Our names are confusing :/ So we have QScopedPointer<QQuickWebPage> pageView; which is our item. The view is a bit confusing there. So isn't q->mapRectToWebContent(pageView->boundingRect()); the same as the actual web contents? Maybe there is an easier way to get that without transforming anyway, the name "const QRectF contentsRectInCSSCoordinates" might be more clear. Anyway, why not do this differently Intersect the rect of the pageItem with the view and then map the result? const QRectF visibleRectInCSSCoordinates = q->mapRectToWebContent(q->boundingRect().intersected(pageView->boundingRect())); You could also make a methods like QQuickWebViewPrivate::visibleContentsRect() as we are doing this multiple places (you are only fixing one here). { const QRectF viewportRect = q->boundingRect(); const QRectF contentsRect = pageView->boundingRect(); return q->mapRectToWebContent(viewportRect.intersected(contentsRect)).toAlignedRect(); }
Hugo Parente Lima
Comment 3
2012-03-05 15:19:11 PST
You are right, I can avoid multiple transformations before doing the intersection. I'll improve and re-upload the patch (probably tomorrow). Thanks for the feedback =]
Hugo Parente Lima
Comment 4
2012-03-06 10:42:21 PST
Created
attachment 130404
[details]
Patch
WebKit Review Bot
Comment 5
2012-03-06 13:43:26 PST
Comment on
attachment 130404
[details]
Patch Clearing flags on attachment: 130404 Committed
r109957
: <
http://trac.webkit.org/changeset/109957
>
WebKit Review Bot
Comment 6
2012-03-06 13:43:31 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug