position:fixed elements clipped when zoomed out of very wide content




3 years ago
3 years ago


(Reporter: Andy Cook, Unassigned)


42 Branch

Firefox Tracking Flags

(Not tracked)




3 years ago
Overview: In Firefox for Android position:fixed elements get clipped or completely disappear when fully zoomed out of very wide (or high?) content.

Additional Builds and Platforms: bug does not occur on Firefox desktop 41.0.2 on Arch Linux.

Steps to reproduce:

1. using Firefox for Android 40.0 or 42.0b10 (I'm on a 8-inch Acer Iconia One 8 tablet) visit isolated test page at http://dizzib.github.io/experiment/position-fixed.html

2. pinch-zoom all the way out so the entire 2000px-by-2000px grey div is visible.

Actual results:

The top position:fixed element become right-clipped. The bottom and right position:fixed element disappear altogether. See screenshot https://drive.google.com/file/d/0B62xQDt2P6U6MGpLLU1HR1JQSzg/view?usp=sharing

Expected results:

Every position:fixed element should be visible and unclipped like when zoomed in: see screenshot https://drive.google.com/file/d/0B62xQDt2P6U6LVJhdlk4NnJ2c0k/view?usp=sharing

Comment 1

3 years ago
Real world use-case at http://www.whodotheyserve.com/


3 years ago
Component: General → Graphics, Panning and Zooming
Product: Firefox → Firefox for Android
Version: 42 Branch → Firefox 42


3 years ago
Summary: Firefox for Android position:fixed elements clipped when zoomed out of very wide content → position:fixed elements clipped when zoomed out of very wide content
The top one getting clipped is expected, because you're setting a width:100%, and the page renders with a CSS viewport width of 980px. Zooming out will not change the CSS viewport dimensions, and so when you zoom out the top bar shrinks and exposes its true size. The bottom/right ones do appear to be getting clipped and as far as I can tell they shouldn't be.

I looked at the layer dump and there's no clip or shadow-clip on the fixed-pos layers themselves, but the visible region on the layer is truncated. Presumably something in layout is applying a clip during paint when it shouldn't be.
Component: Graphics, Panning and Zooming → Layout
Ever confirmed: true
Product: Firefox for Android → Core
Hardware: Unspecified → All
Version: Firefox 42 → 42 Branch

Comment 3

3 years ago
Ah, thanks for your explanation. On further investigation it seems the bottom position:fixed element is not being clipped. Rather it is being scrolled out of view just before full zoom-out is reached if the address-bar is visible, and is revealed by hiding the address-bar.

Screenshot https://drive.google.com/file/d/0B62xQDt2P6U6RG9Fa0wwSVhKZjQ/view?usp=sharing
Ah, the behaviour is different in Fx42 vs Fx43, probably because of the rewrite of the dynamic toolbar. I was testing in Fx43. Regardless, there does appear to be an issue here that needs to be fixed.
nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay sets the dirty rect and clip for fixed pos elements, it might be involved.
You need to log in before you can comment on or make changes to this bug.