RESOLVED FIXED 70552
iframes seem to occasionally doubly scale or scale incorrectly when pageScaleFactor != 1.0
https://bugs.webkit.org/show_bug.cgi?id=70552
Summary iframes seem to occasionally doubly scale or scale incorrectly when pageScale...
Fady Samuel
Reported 2011-10-20 15:33:17 PDT
Please attempt to scale this page to repo. Notice that the top Ad is not always correctly scaled.
Attachments
Reduction (714 bytes, application/zip)
2011-10-25 16:11 PDT, Fady Samuel
no flags
Fixed Reduction (718 bytes, application/zip)
2011-10-25 16:18 PDT, Fady Samuel
no flags
Patch (6.50 KB, patch)
2011-10-27 11:01 PDT, Fady Samuel
no flags
Fady Samuel
Comment 1 2011-10-25 16:11:35 PDT
Created attachment 112420 [details] Reduction I've attached a reduction for this bug. This happens on Chromium Linux (with fixed layout and scaling enabled locally) and may or may not repo on other platforms (not tested yet): 1. Open up iframe-content-scaling-bug.html. 2. Change the scale factor of the page 3. Reload The two green boxes should be the same size, but the green box in the iframe ends up double scaling.
Fady Samuel
Comment 2 2011-10-25 16:18:09 PDT
Created attachment 112422 [details] Fixed Reduction
Fady Samuel
Comment 3 2011-10-26 08:14:37 PDT
I'm beginning to suspect this bug and this bug: https://bugs.webkit.org/show_bug.cgi?id=70632 might be related because this reduction is causing Chromium to crash occasionally.
Fady Samuel
Comment 4 2011-10-26 14:05:07 PDT
I believe I have a fix for this: Changing: documentStyle->setPageScaleTransform(document->page() ? document->page()->pageScaleFactor() : 1); to documentStyle->setPageScaleTransform(frame ? frame->frameScaleFactor() : 1); in CSSStyleSelector::styleForDocument fixes the issue. Now I just have to come up with an automated layout test for this.
Fady Samuel
Comment 5 2011-10-27 06:51:21 PDT
(In reply to comment #4) > I believe I have a fix for this: > > Changing: > > documentStyle->setPageScaleTransform(document->page() ? document->page()->pageScaleFactor() : 1); > > to > > documentStyle->setPageScaleTransform(frame ? frame->frameScaleFactor() : 1); > > in CSSStyleSelector::styleForDocument > > fixes the issue. Now I just have to come up with an automated layout test for this. It seems it's difficult to write an automated layout test to repo this issue. I can only repro it in the browser if I reload the page after I set the page scale factor.
Fady Samuel
Comment 6 2011-10-27 11:01:25 PDT
WebKit Review Bot
Comment 7 2011-10-27 14:09:41 PDT
Comment on attachment 112710 [details] Patch Clearing flags on attachment: 112710 Committed r98637: <http://trac.webkit.org/changeset/98637>
WebKit Review Bot
Comment 8 2011-10-27 14:09:46 PDT
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.