Closed Bug 943921 Opened 11 years ago Closed 10 years ago

Regression: Buttons on Twitter main splash page are partially obscured

Categories

(Firefox for Android Graveyard :: General, defect)

28 Branch
ARM
Android
defect
Not set
normal

Tracking

(firefox26 unaffected, firefox27+ affected, firefox28- affected, fennec+)

RESOLVED WORKSFORME
Tracking Status
firefox26 --- unaffected
firefox27 + affected
firefox28 - affected
fennec + ---

People

(Reporter: aaronmt, Unassigned)

References

()

Details

(Keywords: regression, reproducible)

Attachments

(1 file)

http://twitter.com

See screenshot comparison

--
Nightly|Aurora (11/27) | LG Nexus 4 (Android 4.4)
Could be related to some of the "top margin" bugs I've seen filed lately
Don't think so. Aurora is affected.
Regression window-wanted:

mc:
not affected build: 02-10-2013
affected build: 03-10-2013  
-pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e3c84e9f2490&tochange=0e26e6f12ad9
7e8f946d0d1a	Kartikaya Gupta — Bug 919437 - Use the scrollport size as the inner size if it is set. r=tn, roc

tn are you able to reproduce this this bug?
Flags: needinfo?(tnikkel)
Blocks: 919437
Yeah, I can reproduce this. It looks like they are sizing their page to innerHeight, and our innerHeight value does not factor in the dynamic toolbar. kats, do you think we should revisit that decision based on this?
Flags: needinfo?(tnikkel) → needinfo?(bugmail.mozilla)
For the record, this was discussed in bug 923663 which I wontfix'ed.

I also checked to see what the behaviour on twitter.com is and although the buttons are cut off in the initial view, the page can be scrolled to hide the dynamic toolbar, in which case the page looks fine. This agrees with the conceptual model I described in bug 923663 comment 12. I think Chris should probably weigh in here as well.

If we decide to keep the current FF behaviour then we can move this to Tech Evangelism and ask Twitter to not use innerHeight unless they want to keep the current user experience - they should be able to use height=device-height or some other such mechanism to size the page to fit with the dynamic toolbar visible.
Flags: needinfo?(bugmail.mozilla) → needinfo?(chrislord.net)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> For the record, this was discussed in bug 923663 which I wontfix'ed.
> 
> I also checked to see what the behaviour on twitter.com is and although the
> buttons are cut off in the initial view, the page can be scrolled to hide
> the dynamic toolbar, in which case the page looks fine. This agrees with the
> conceptual model I described in bug 923663 comment 12. I think Chris should
> probably weigh in here as well.
> 
> If we decide to keep the current FF behaviour then we can move this to Tech
> Evangelism and ask Twitter to not use innerHeight unless they want to keep
> the current user experience - they should be able to use
> height=device-height or some other such mechanism to size the page to fit
> with the dynamic toolbar visible.

This is probably not a useful thing to be saying, but I agree with the reporter in bug 923663 - I think when we resize the CSS viewport to not include the dynamic toolbar in browser.js and measure, the innerHeight should be smaller. Otherwise, this is going to break a lot of pages, and like the reporter mentions, it doesn't match behaviour in Chrome (or, I believe, Safari).
Flags: needinfo?(chrislord.net)
What about during the animation? And should we be firing resize events to content when the toolbar shows/hides?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8)
> What about during the animation? And should we be firing resize events to
> content when the toolbar shows/hides?

We only set the CSS viewport at two sizes - screen size, or screen-minus toolbar, during measurement. If we determine the page to fit into the screen minus toolbar, then that's the size of the window, otherwise it's the size of the whole window. I think I may be misunderstanding what's in question here...? If the toolbar is in a state where it can animate, it means the page can't fit into the screen minus toolbar, so in that case, the window size is unaffected by the toolbar visibility.

Basically, toolbar visibility never affects window size, but page size does.
As of bug 919437, the innerWidth/innerHeight return the "visual viewport" rather than the "layout viewport" (aka the CSS viewport). So really when we set the CSS viewport is irrelevant; what we care about is how large the user-visible content area is.

While the toolbar animates off screen, that area changes, and so I would expect innerHeight to also follow along. Content might depend on this if they're doing something wacky like simulating position:fixed with JS (listening for resize events and moving content accordingly). If we don't animate the innerHeight to be in sync with the toolbar animation then the faux-position:fixed would jump. I guess it's probably not important enough of a use case but if we're going to change this I just want to make sure I understand what our expected behaviour is.
Triage Comment:
We are going to wait on tracking this until we have more information as to whether this is a bug needing tracking or something that will go to Tech Evangelism.
Per Comment 6 are we keeping the behavior or do we want to move this to Tech Evangelism
Flags: needinfo?(bugmail.mozilla)
We can change our behaviour if Cwiiis is ok with the behaviour I'm describing in comment 10.
Flags: needinfo?(bugmail.mozilla) → needinfo?(chrislord.net)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #10)
> As of bug 919437, the innerWidth/innerHeight return the "visual viewport"
> rather than the "layout viewport" (aka the CSS viewport). So really when we
> set the CSS viewport is irrelevant; what we care about is how large the
> user-visible content area is.
> 
> While the toolbar animates off screen, that area changes, and so I would
> expect innerHeight to also follow along. Content might depend on this if
> they're doing something wacky like simulating position:fixed with JS
> (listening for resize events and moving content accordingly). If we don't
> animate the innerHeight to be in sync with the toolbar animation then the
> faux-position:fixed would jump. I guess it's probably not important enough
> of a use case but if we're going to change this I just want to make sure I
> understand what our expected behaviour is.

I'm in two minds about this, which isn't helpful I understand.

On the one hand, I think that the margins should only be taken into account in innerWidth/innerHeight if they're permanently visible (pinned). I say this, as I think it may be a security concern if content can detect when the toolbar is/isn't visible, which it currently can't in any useful/exploitable way.

On the other hand, absolutely positioned and JS-positioned content may end up shoved off the bottom of the screen if we don't update innerWidth/innerHeight on pages that cause an unpinned toolbar. I don't like the relayouting implications for though, performance is very likely to be impacted badly if we change innerWidth/Height on toolbar visibility.

It's telling though, that the only use cases for this size to change with the toolbar are things that we really shouldn't be encouraging web developers to do (absolute positioning relative to the bottom of the screen on pages that are larger than the screen and simulating position:fixed).

Taking all this into account, I'm going with my first paragraph - innerWidth/innerHeight should only take the toolbar into account if it's pinned, otherwise they should reflect the full viewable area including the toolbar, regardless of the toolbar visibility.
Flags: needinfo?(chrislord.net)
Does that mean this is a WONTFIX ?
tracking-fennec: ? → +
Yes. Well, it's either a WONTFIX or this bug should be moved to Tech Evangelism.
Will track for now, even if it's Tech Evangelism it would still be good to take a stab at requesting change since this is such a high-traffic site and visually that change is jarring.
Like magic I don't even see this anymore ....
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
No longer tracking in that case, renom if it is REOPENED.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: