WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
97617
(Threaded scrolling) WebKit not scrolling to the correct location upon going back on macsurfer.com
https://bugs.webkit.org/show_bug.cgi?id=97617
Summary
(Threaded scrolling) WebKit not scrolling to the correct location upon going ...
Brady Eidson
Reported
2012-09-25 17:10:58 PDT
(Threaded scrolling) WebKit not scrolling to the correct location upon going back on macsurfer.com In Tiled Drawing (and therefore Threaded Scrolling) mode, *all* scroll position changes are treated as user generated scrolls and generate scroll events. This breaks restoring scroll position when going back to sites that are slow to layout to their full length. In radar as <
rdar://problem/12039913
>
Attachments
Patch v1
(11.35 KB, patch)
2012-09-25 17:18 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch v2
(10.84 KB, patch)
2012-09-25 18:07 PDT
,
Brady Eidson
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch v3 - Now with more scroll events
(10.15 KB, patch)
2012-09-25 19:22 PDT
,
Brady Eidson
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2012-09-25 17:18:14 PDT
Created
attachment 165703
[details]
Patch v1
Anders Carlsson
Comment 2
2012-09-25 17:20:36 PDT
Comment on
attachment 165703
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=165703&action=review
> Source/WebCore/page/scrolling/ScrollingTreeState.cpp:171 > +void ScrollingTreeState::setIsProgrammaticScroll(bool isProgrammaticScroll) > +{
I think this should just be an extra parameter to setRequestedScrollPosition to make it harder to call setRequestedScrollPosition without thinking about whether it's a programmatic scroll or not. If you do this you don't need the extra IsProgrammaticScroll flag.
Darin Adler
Comment 3
2012-09-25 17:30:37 PDT
Comment on
attachment 165703
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=165703&action=review
> Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:58 > + , m_updatingForProgrammaticScroll(false)
I can’t find any code that’s reading this data member. Is this just a leftover from an earlier cut at the patch?
> Source/WebCore/page/scrolling/ScrollingCoordinator.h:176 > + bool m_updatingForProgrammaticScroll;
As I mentioned above, I think this should be removed.
> Source/WebCore/page/scrolling/ScrollingTree.h:124 > + bool m_handlingProgrammaticScroll;
I know the other booleans aren’t doing it, but I thought we preferred names that finish the sentence “tree <xxx>”, so it would be “is handling programmatic scroll” rather than “handling programmatic scroll”.
> Source/WebCore/page/scrolling/ScrollingTreeState.cpp:46 > + , m_isProgrammaticScroll(false)
Is the correct phrase “tree state is programmatic scroll”? Maybe “tree state represents programmatic scroll”? What is the phrase form of what this means here?
Brady Eidson
Comment 4
2012-09-25 17:55:42 PDT
(In reply to
comment #2
)
> (From update of
attachment 165703
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=165703&action=review
> > > Source/WebCore/page/scrolling/ScrollingTreeState.cpp:171 > > +void ScrollingTreeState::setIsProgrammaticScroll(bool isProgrammaticScroll) > > +{ > > I think this should just be an extra parameter to setRequestedScrollPosition to make it harder to call setRequestedScrollPosition without thinking about whether it's a programmatic scroll or not. > > If you do this you don't need the extra IsProgrammaticScroll flag.
Okay, this makes sense to me. Will do.
Brady Eidson
Comment 5
2012-09-25 17:57:32 PDT
(In reply to
comment #3
)
> (From update of
attachment 165703
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=165703&action=review
> > > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:58 > > + , m_updatingForProgrammaticScroll(false) > > I can’t find any code that’s reading this data member. Is this just a leftover from an earlier cut at the patch? > > > Source/WebCore/page/scrolling/ScrollingCoordinator.h:176 > > + bool m_updatingForProgrammaticScroll; > > As I mentioned above, I think this should be removed.
You're totally right. Earlier cut at the patch, and now removed.
> > > Source/WebCore/page/scrolling/ScrollingTree.h:124 > > + bool m_handlingProgrammaticScroll; > > I know the other booleans aren’t doing it, but I thought we preferred names that finish the sentence “tree <xxx>”, so it would be “is handling programmatic scroll” rather than “handling programmatic scroll”. > > > Source/WebCore/page/scrolling/ScrollingTreeState.cpp:46 > > + , m_isProgrammaticScroll(false) > > Is the correct phrase “tree state is programmatic scroll”? Maybe “tree state represents programmatic scroll”? What is the phrase form of what this means here?
I'll sort these names out.
Brady Eidson
Comment 6
2012-09-25 18:07:19 PDT
Created
attachment 165707
[details]
Patch v2
WebKit Review Bot
Comment 7
2012-09-25 19:06:29 PDT
Comment on
attachment 165707
[details]
Patch v2
Attachment 165707
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14042002
New failing tests: scrollbars/scrollevent-iframe-no-scrolling.html fast/events/fire-scroll-event.html fast/events/scroll-event-during-modal-dialog.html fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html scrollbars/scrollable-iframe-remove-crash.html fast/events/scroll-event-phase.html
Brady Eidson
Comment 8
2012-09-25 19:11:11 PDT
(In reply to
comment #7
)
> (From update of
attachment 165707
[details]
) >
Attachment 165707
[details]
did not pass chromium-ews (chromium-xvfb): > Output:
http://queues.webkit.org/results/14042002
> > New failing tests: > scrollbars/scrollevent-iframe-no-scrolling.html > fast/events/fire-scroll-event.html > fast/events/scroll-event-during-modal-dialog.html > fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html > scrollbars/scrollable-iframe-remove-crash.html > fast/events/scroll-event-phase.html
Seeing *some* of these on Mac, certainly not all. Looking in to them.
Brady Eidson
Comment 9
2012-09-25 19:16:00 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (From update of
attachment 165707
[details]
[details]) > >
Attachment 165707
[details]
[details] did not pass chromium-ews (chromium-xvfb): > > Output:
http://queues.webkit.org/results/14042002
> > > > New failing tests: > > scrollbars/scrollevent-iframe-no-scrolling.html > > fast/events/fire-scroll-event.html > > fast/events/scroll-event-during-modal-dialog.html > > fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html > > scrollbars/scrollable-iframe-remove-crash.html > > fast/events/scroll-event-phase.html > > Seeing *some* of these on Mac, certainly not all. Looking in to them.
Complete boneheaded mistake on my part - Turns out that window.scrollTo *is* supposed to generate scroll events. Perhaps we really should be generating scroll events for the "restore scroll position on back" also - if the page needs them to stay in sync, then it needs them. But window.scrollTo and the position restoration should still not be considered user scrolls. This is an easy modification to the current patch.
Brady Eidson
Comment 10
2012-09-25 19:22:46 PDT
Created
attachment 165718
[details]
Patch v3 - Now with more scroll events
Anders Carlsson
Comment 11
2012-09-26 08:43:49 PDT
Comment on
attachment 165718
[details]
Patch v3 - Now with more scroll events View in context:
https://bugs.webkit.org/attachment.cgi?id=165718&action=review
> Source/WebCore/page/scrolling/ScrollingTreeState.h:139 > + bool m_representsProgrammaticScroll;
How about m_scrollPositionRequestRepresentsProgrammaticScroll or m_requestedScrollPositionRepresentsProgrammaticScroll to better indicate that it goes with setRequestedScrollPosition? Looks fine otherwise!
Brady Eidson
Comment 12
2012-09-26 09:00:09 PDT
Landed in
http://trac.webkit.org/changeset/129652
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug