Closed
Bug 854099
Opened 12 years ago
Closed 12 years ago
Regression: the top end of anchored element is hidden by dynamic toolbar.
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox22 affected, firefox23 verified)
RESOLVED
FIXED
Firefox 23
People
(Reporter: tetsuharu, Assigned: cwiiis)
References
Details
(Keywords: regression, Whiteboard: [NavBar])
Attachments
(2 files, 1 obsolete file)
47.73 KB,
image/png
|
Details | |
6.90 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
[Environment]
http://hg.mozilla.org/mozilla-central/rev/3825fdbcec62
[Step to reproduce]
Open the link which has anchor id from other page. e.g: https://mozillalabs.com/en-US/#featured-projects
[Result]
The top end of anchor element will be hidden by dynamic toolbar (see screenshot.)
[Expectation]
Firefox should keep the margin as toolbar height on the top end of anchored element. when dynamic toolbar is enabled.
Reporter | ||
Updated•12 years ago
|
Blocks: dynamic-toolbar
Updated•12 years ago
|
Reporter | ||
Updated•12 years ago
|
Keywords: regression
Assignee | ||
Comment 1•12 years ago
|
||
So the scroll-to-anchor code should definitely be looking at the fixed position margins of the pres shell - I'll take a look at this.
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•12 years ago
|
||
Expand the target rect when there are fixed position margins so that those margins apply to scroll-to-anchor.
Attachment #733297 -
Flags: review?(roc)
Comment on attachment 733297 [details] [diff] [review]
Take fixed position margins into account when scrolling to rect in nsPresShell
Review of attachment 733297 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsPresShell.cpp
@@ +3151,5 @@
> *
> * This needs to work even if aRect has a width or height of zero.
> */
> static void ScrollToShowRect(nsIScrollableFrame* aScrollFrame,
> + nsRect aRect,
Instead of modifying the parameter, better to add a new local variable and modify that.
@@ +3163,5 @@
>
> + // If this is the root scroll frame, make sure to take into account the
> + // content document fixed position margins. When set, these indicate that
> + // chrome is obscuring the viewport.
> + nsIFrame* frame = do_QueryFrame(aScrollFrame);
Should probably modify callers to pass nsIFrame down here so we're not QueryFraming to nsIScrollableFrame and then QueryFraming back.
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> Comment on attachment 733297 [details] [diff] [review]
> Take fixed position margins into account when scrolling to rect in
> nsPresShell
>
> Review of attachment 733297 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: layout/base/nsPresShell.cpp
> @@ +3151,5 @@
> > *
> > * This needs to work even if aRect has a width or height of zero.
> > */
> > static void ScrollToShowRect(nsIScrollableFrame* aScrollFrame,
> > + nsRect aRect,
>
> Instead of modifying the parameter, better to add a new local variable and
> modify that.
Agreed and done.
> @@ +3163,5 @@
> >
> > + // If this is the root scroll frame, make sure to take into account the
> > + // content document fixed position margins. When set, these indicate that
> > + // chrome is obscuring the viewport.
> > + nsIFrame* frame = do_QueryFrame(aScrollFrame);
>
> Should probably modify callers to pass nsIFrame down here so we're not
> QueryFraming to nsIScrollableFrame and then QueryFraming back.
The only caller of the function does extra work depending on whether it's a scrollable frame or not, so I'd have to add an extra parameter rather than a different one - I'll do that, but let me know if there's an alternative solution you'd like to see.
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #733297 -
Attachment is obsolete: true
Attachment #733297 -
Flags: review?(roc)
Attachment #733772 -
Flags: review?(roc)
Attachment #733772 -
Flags: review?(roc) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Try was green with v1 of the patch, v2 is just small structural changes and works fine locally, pushed to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f8ed82bee517
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Updated•12 years ago
|
Whiteboard: [NavBar]
Comment 8•12 years ago
|
||
Verified fixed on:
-build: Firefox for Android 23.0a1(2013-05-13)
-device: Samsung Galaxy Nexus
-OS: Android 4.1.1
status-firefox23:
--- → verified
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•