RESOLVED FIXED 104294
Incorrect position of layers for fixed position elements when page is scaled smaller than viewport
https://bugs.webkit.org/show_bug.cgi?id=104294
Summary Incorrect position of layers for fixed position elements when page is scaled ...
Xianzhu Wang
Reported 2012-12-06 13:45:40 PST
Created attachment 178072 [details] test case This might be for Chromium only. Not tested on other platforms. scrollOffsetForFixedPosition() calculates incorrect position for fixed elements when the content (originally larger than viewport) is scaled to smaller than the viewport, causing the graphics layers of fixed position elements be placed at wrong positions. To reproduce, run the attached test case on chromium-linux. The position of the layer for the fixed element is (218, 230). Should be (10, 10).
Attachments
test case (757 bytes, text/html)
2012-12-06 13:45 PST, Xianzhu Wang
no flags
Patch (6.34 KB, patch)
2012-12-06 14:11 PST, Xianzhu Wang
no flags
Add missing expected file (7.23 KB, patch)
2012-12-06 14:55 PST, Xianzhu Wang
no flags
Xianzhu Wang
Comment 1 2012-12-06 14:11:28 PST
WebKit Review Bot
Comment 2 2012-12-06 14:46:52 PST
Comment on attachment 178080 [details] Patch Attachment 178080 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15170670
Xianzhu Wang
Comment 3 2012-12-06 14:55:34 PST
Created attachment 178087 [details] Add missing expected file
Xianzhu Wang
Comment 4 2012-12-07 15:30:59 PST
Comment on attachment 178087 [details] Add missing expected file View in context: https://bugs.webkit.org/attachment.cgi?id=178087&action=review Added some explanations for reviewers. > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:71 > + if (maxValue <= 0) If contentsSize < visibleContentSize, return 0 directly. All other changed code should be equivalent with the original code. > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:-94 > - (contentsSize.height() - visibleContentRect.height() * frameScaleFactor) / maxOffset.height()); The above code is moved into fixedPositionScrollOffset(). Here maxOffset might be 0, and there were unnecessary floating point operations on infinity values.
Xianzhu Wang
Comment 5 2012-12-10 13:49:29 PST
@bdakin, could you please review this change? Thanks!
James Robinson
Comment 6 2012-12-11 15:00:58 PST
Comment on attachment 178087 [details] Add missing expected file R=me
WebKit Review Bot
Comment 7 2012-12-11 15:23:23 PST
Comment on attachment 178087 [details] Add missing expected file Clearing flags on attachment: 178087 Committed r137368: <http://trac.webkit.org/changeset/137368>
WebKit Review Bot
Comment 8 2012-12-11 15:23:30 PST
All reviewed patches have been landed. Closing bug.
Beth Dakin
Comment 9 2012-12-14 15:07:16 PST
compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html is failing on the WK2 bots.
Beth Dakin
Comment 10 2012-12-14 15:11:02 PST
(In reply to comment #9) > compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html is failing on the WK2 bots. Though it seems fine on my computer. Ugh.
Note You need to log in before you can comment on or make changes to this bug.