Bug 104303 - Fixed position out-of-view check is incorrect when page is scaled
Summary: Fixed position out-of-view check is incorrect when page is scaled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xianzhu Wang
URL:
Keywords:
Depends on: 104294
Blocks: 102543
  Show dependency treegraph
 
Reported: 2012-12-06 14:16 PST by Xianzhu Wang
Modified: 2012-12-11 17:54 PST (History)
9 users (show)

See Also:


Attachments
Patch (tests may fail when lacking of patch to bug 104294) (6.48 KB, patch)
2012-12-06 17:04 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff
Patch (10.76 KB, patch)
2012-12-11 16:15 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2012-12-06 14:16:11 PST
Currently out-of-view check of fixed position doesn't consider the page scale. When the page is scaled down, originally out-of-view fixed element might be in-view; and vice versa.
Comment 1 Xianzhu Wang 2012-12-06 17:04:05 PST
Created attachment 178113 [details]
Patch (tests may fail when lacking of patch to bug 104294)
Comment 2 Build Bot 2012-12-06 23:37:46 PST
Comment on attachment 178113 [details]
Patch (tests may fail when lacking of patch to bug 104294)

Attachment 178113 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15183285

New failing tests:
compositing/layer-creation/fixed-position-out-of-view-scaled.html
Comment 3 WebKit Review Bot 2012-12-07 02:45:17 PST
Comment on attachment 178113 [details]
Patch (tests may fail when lacking of patch to bug 104294)

Attachment 178113 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15183346

New failing tests:
platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled.html
compositing/layer-creation/fixed-position-out-of-view-scaled.html
Comment 4 Sami Kyöstilä 2012-12-11 09:39:26 PST
Thanks Xianzhu, looks like you beat me to it :) Would you also mind adding a test with a non-zero scroll offset for the viewport since this is just checking against the viewport size?

Also, I noticed that fixing things to the bottom or right side of the viewport doesn't work correctly. It looks like it may somehow be using the layout viewport instead of the visual viewport. That's an altogether different bug, though.
Comment 5 Kenneth Rohde Christiansen 2012-12-11 09:45:01 PST
LGTM but should not fail on mac :-)
Comment 6 Xianzhu Wang 2012-12-11 09:47:40 PST
(In reply to comment #4)
> Thanks Xianzhu, looks like you beat me to it :) Would you also mind adding a test with a non-zero scroll offset for the viewport since this is just checking against the viewport size?
>

Thanks for the suggestion. This is necessary. Will add it.

> Also, I noticed that fixing things to the bottom or right side of the viewport doesn't work correctly. It looks like it may somehow be using the layout viewport instead of the visual viewport. That's an altogether different bug, though.

Can you verify if this is caused by bug 104292?
Comment 7 Xianzhu Wang 2012-12-11 09:48:37 PST
(In reply to comment #5)
> LGTM but should not fail on mac :-)

The failure will be automatically fixed after the depended bug 104294 is resolved.
Comment 8 Kenneth Rohde Christiansen 2012-12-11 09:54:54 PST
> Can you verify if this is caused by bug 104292?

Don't you mean 104294?
Comment 9 Xianzhu Wang 2012-12-11 09:58:18 PST
(In reply to comment #8)
> > Can you verify if this is caused by bug 104292?
> 
> Don't you mean 104294?

Yes. Sorry for the typo :)
Comment 10 Sami Kyöstilä 2012-12-11 10:20:06 PST
(In reply to comment #6)
> Can you verify if this is caused by bug [104294]?

Unfortunately that patch doesn't appear to fix it. For example see http://css.flepstudio.org/en/css-properties/position-static-absolute-relative-static.html. The bottom right fixed div doesn't follow the visual viewport.
Comment 11 Xianzhu Wang 2012-12-11 11:38:04 PST
Filed bug 104692 for the issue in #4 and #10.
Comment 12 Xianzhu Wang 2012-12-11 16:15:17 PST
Created attachment 178910 [details]
Patch
Comment 13 Xianzhu Wang 2012-12-11 16:16:22 PST
Updated the patch after landing 104294. Also added scrolled test.
Comment 14 WebKit Review Bot 2012-12-11 17:54:35 PST
Comment on attachment 178910 [details]
Patch

Clearing flags on attachment: 178910

Committed r137399: <http://trac.webkit.org/changeset/137399>
Comment 15 WebKit Review Bot 2012-12-11 17:54:40 PST
All reviewed patches have been landed.  Closing bug.