Commit Graph
104 Commits
Author SHA1 Message Date
Florian Queze 46616cd166 Bug 1357061 - remove potentially useless ensureElementIsVisible call (that currently causes a sync reflow) when an arrowscrollbox handles an underflow event, r=dao. 2017-04-19 23:09:34 +02:00
Masayuki Nakano 183fb59ce4 Bug 1349828 Smooth scroller of <scrollbox> should not try to scroll to outside of the range r=mstange
The scroll destination of the smooth scroller of <scrollbox> can be outside of the actual scrollable range.  Therefore, it doesn't make scroll slower even when the end appears.

This patch makes the destination always in the scrollable range.

MozReview-Commit-ID: CfEGzhG7Jh7
2017-04-10 19:56:40 +09:00
Florian Quèze 73074c2660 Bug 1344711 - hand cleanup of remaining useless try blocks around get*Pref calls identified by eslint, r=jaws. 2017-03-07 15:29:48 +01:00
Florian Quèze c7eae86054 Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws. 2017-03-07 15:29:48 +01:00
Florian Quèze 0a4ee94a29 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Neil Deakin b0f77a8e72 Bug 1311279, scroll the select popup when click+drag is used, r=mconley 2016-11-17 09:56:43 -05:00
Jared Wein 601c1e5636 Bug 1331661 - Manually fix the remaining 'quotes' errors for eslint. r=Gijs
MozReview-Commit-ID: 7iXjQtp9ftV
2017-01-17 10:38:58 -06:00
Florian Quèze 63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Jared Wein 242ab87626 Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
MozReview-Commit-ID: FuVu8skcqOe
2016-12-30 21:47:25 -05:00
Masayuki Nakano 5682315f90 Bug 1320467 <scrollbox>.lineScrollAmount should return average width or height r=mstange
Currently, <scrollbox>.lineScrollAmount returns its font height.  However, according to the other methods, <scrollbox> is designed for scrolling elements in it.  Additionally, old implementation declared that1 line is 1 element.  Therefore, this patch makes it returns avarage width or height of the children.

MozReview-Commit-ID: E9qfhHy5sTt
2016-12-10 11:39:34 +09:00
Masayuki Nakano 7ad4f410ae Bug 1320609 part.1 wheel event handler of <scrollbox> should use |_smoothScrollByPixels| instead of |scrollByPixels| when the deltaMode is DOM_DELTA_LINE or DOM_DELTA_PAGE r=mstange
<scrollbox> should scroll its contents smoothly even if wheel device doesn't support high resolution scroll.

This patch makes the wheel event handler use |_smoothScrollByPixels| when deltaMode is DOM_DELTA_LINE or DOM_DELTA_PAGE.  The reason why ignoring DOM_DELTA_PIXEL is, such devices are typically supports high resolution scroll.  Therefore, <scrollbox> doesn't need to animate its scroll by itself.

However, |_smoothScrollByPixels| doesn't work fine without some additional fixes.

First, this patch doesn't stop pending scroll from |_smoothScrollByPixels| because discarding some pending scroll causes slower scroll.  Actually, when you turn mouse wheel faster, scroll amount becomes smaller without this fix.

Next, this patch adds continous scroll mode to |_scrollAnim| object.  If it's requested new animation during processing previous scroll, it keeps previous scroll amount and restart animation with new destination.  Additionally, accumulating the scroll distance as fractional value.  Therefore, it scrolls 3px when 1.5px scroll is requested twice.

Finally, this patch discards pending scrolls when user tries to scroll to reverse direction.  When user tries to scroll to reserse direction, the user must want to scroll the contents from current position rather than actual scroll destination.  Therefore, this patch discards pending scrolls in |_smoothScrollByPixels|.  Although, it might be better to handle this in |_scrollAnim|.  However, |_isScrolling| is not managed by it and changing the behavior in private method is safer than changing utility object (i.e., |_scrollAnim|).

Additionally, this patch fixes timestamp issue at callback of requestAnimationFrame().  Sometimes, the given timestamp is older than start time.  In that case, current code scrolls to reverse diretion.  Therefore, we should treat such old timestamp as same as start time.

MozReview-Commit-ID: DluWUN2VhVw
2016-12-22 20:04:35 +09:00
Joel Maher 62614255bf backout aba885aafee0210b1f063a423b1c0b3ce28d15f7 for intermittent bug 1272834
MozReview-Commit-ID: BTJ13wWojaI
2016-12-14 10:59:43 -05:00
Masayuki Nakano 2c60ee0938 Bug 1316505 part.2 The "wheel" event of <scrollbox> should use |.scrollByPixels()| instead of |.scrollByPages()| for respecting high resolution delta value and making the scroll smoother r=mstange
Similar to the previous patch, "wheel" event should use |.scrollByPixels()| instead of |.scrollByPages()| because |.scrollByPages()| doesn't support high resolution delta value.

This patch makes the "wheel" event handler of <scrollbox> use |.scrollByPixels()| at handling "wheel" events whose deltaMode is DOM_DELTA_PAGE and multiplies the delta value and |.scrollClientSize|.

MozReview-Commit-ID: 1nyD7niiq3W
2016-11-13 18:04:08 +09:00
Masayuki Nakano 9a2949f773 Bug 1316505 part.1 The "wheel" event handler of <scrollbox> should use |.scrollByPixels()| for respecting wheel event's scroll speed and scrolling smoother r=mstange
Currently, ths "wheel" event handler of <scrollbox> uses |.scrollByIndex()|.  However, it scrolls too fast when "wheel" event has high resolution delta value when its deltaMode is DOM_DELTA_LINE.

For respecting the delta value, it should use |.scrollByPixels()|.  Therefore, this patch implements new readonly property, |.lineScrollAmount|, which returns font size of the |.scrollbox| and makes "wheel" event handler multiplies the delta value and |.lineScrollAmount|.

MozReview-Commit-ID: KzIvJyxqrn5
2016-11-13 19:17:07 +09:00
Neil Deakin ba9f7af93f Bug 1311279, scroll the select popup when click+drag is used, r=mconley 2016-11-17 09:56:43 -05:00
Carsten "Tomcat" Book 7bd0ed75c9 Backed out changeset 09093d38540e (bug 1311279) 2016-11-17 15:42:38 +01:00
Neil Deakin e51adfaed8 Bug 1311279, scroll the select popup when click+drag is used, r=mconley 2016-11-17 09:28:27 -05:00
Kartikaya Gupta e8e8181406 Bug 1302737 - Add rudimentary touch-scrolling support to the XUL scrollbox widget. r=dao
MozReview-Commit-ID: DmXgox2R3uX
2016-09-29 10:05:25 -04:00
Jared Wein 99638e1465 Bug 1294621 - Enable the no-lonely-if rule for eslint. r=gijs
MozReview-Commit-ID: 8izEqc8IyCu
2016-08-12 11:50:35 -04:00
Jared Wein 4518d81cb5 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt
2016-08-04 03:28:58 -04:00
Markus Stange 6685e0adb8 Bug 1251987 - Support by-page scroll deltas in XUL scrollboxes. r=Enn
MozReview-Commit-ID: JL0s4Pum5P5
2016-05-05 13:39:54 -04:00
Markus Stange 80ac69f5ed Bug 1263975 - XUL scrollbox (e.g. the tab bar) should respond to pixel scrolls by pixel scrolling. r=Enn
MozReview-Commit-ID: FWSBkg9wM7r
2016-01-05 18:35:23 +01:00
Wes Kocher 7e9d3916b5 Backed out changeset 954189d579d5 (bug 1263975) for failures in test_mousescroll.xul
MozReview-Commit-ID: 9fXzw19FUeb
2016-04-14 11:05:01 -07:00
Markus Stange eb4a6fa63f Bug 1263975 - XUL scrollbox (e.g. the tab bar) should respond to pixel scrolls by pixel scrolling. r=enndeakin+6102
MozReview-Commit-ID: 8XgagEVbiQg
2016-01-05 18:35:23 +01:00
Dave Townsend a2ba043d69 Bug 1245649: Turn on no-trailing-spaces. r=Gijs 2016-02-03 14:22:33 -08:00
Tooru Fujisawa e1e42ff6d3 Bug 1207497 - Part 1: Remove use of expression closure from toolkit/, exept tests. r=Gijs 2015-09-24 21:20:04 +09:00
Boris Zbarsky f408e21c00 Bug 1181762. Remove uses of mozRequestAnimationFrame from toolkit code. r=gijs 2015-07-14 15:28:57 -04:00
Jon Morton 4a98f87acc Bug 979835: Port BoxObject and its subclasses to WebIDL. r=khuey sr=bz 2014-10-14 13:15:21 -07:00
Dão Gottwald 43017ae146 Bug 1024496 - Call _updateScrollButtonsDisabledState after setting the notoverflowing attribute such that the scrolledtoend attribute isn't left behind. r=enndeakin 2014-06-12 17:56:22 +02:00
Dão Gottwald df266bacda Bug 878020 - Add inner shadows to the tab bar's scrollbox when overflowing. r=Gijs,enndeakin 2014-06-10 16:56:14 +02:00
Alice0775 White ae61e1367c Bug 859126 - Mouse scrolling of long menus breaks if the last item is hidden via display:none. r=dao 2014-03-31 16:28:57 +02:00
Jared Wein 25793e7b6d Bug 875180 - When a tab scrolls into view, half of the curve remains out of view. r=Unfocused 2013-10-22 09:19:30 -07:00
Blake Kaplan f0367a4fd4 Bug 888749 - Don't be confused by <children> elements. r=dao 2013-07-03 15:07:28 -07:00
Frank Yan d634f8640c Bug 851436 - Revert tab strip logic by backing out patches for bug 837486, bug 649654, and bug 821859. r=dao 2013-03-17 14:03:08 -07:00
Frank Yan af57385011 Bug 837486 - Reposition pinned tabs when resetting tab strip underflow. r=dao 2013-02-21 16:55:47 -08:00
Boris Zbarsky 6d73e6462b Bug 831198. Make _arrowScrollAnim.stop() and _scrollAnim.stop() actually cancel the pending requestAnimationFrame callback. r=dao 2013-01-17 12:30:36 -05:00
Gervase Markham cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Marco Bonardo 4a9ce1631b Bug 734653 - Scrollbox should filter out hidden elements, since they are unscrollable.
r=mano
2012-03-13 12:05:23 +01:00
Geoff Lankow ea30cec949 Bug 718255 - Merge nsIPrefBranch2 with nsIPrefBranch - Part C, remove uses of nsIPrefBranch2 in toolkit/ ; r=bsmedberg 2012-01-17 14:18:29 +13:00
Boris Zbarsky 03b10968ec Bug 710981. Add the new name for cancelAnimationFrame. r=roc 2011-12-15 08:53:06 -05:00
Boris Zbarsky 3ac502fb64 Bug 708173. Use cancelRequestAnimationCallback instead of tracking booleans in scrollbox code. r=dao 2011-12-08 01:32:04 -05:00
Frank Yan 17bdf81e23 Bug 672354 - Fix horiz. mouse scroll for horiz. RTL scrollboxen. r=dao 2011-12-04 14:44:11 -08:00
Boris Zbarsky b94545fa17 Bug 706323. Fix scrollbar smoothscrolling to get the timestamp the new way. r=dao 2011-12-01 03:51:22 +00:00
Boris Zbarsky fdcb03bd16 Bug 704171 part 1. Stop using the no-argument form of mozRequestAnimationFrame in our chrome. r=roc,gavin 2011-11-28 07:49:44 -05:00
Markus Stange 4015b52300 Bug 678834 - XUL scrollbox should preventDefault() processed scroll events so that Gecko doesn't attempt to start a swipe from them. r=enndeakin 2011-09-08 15:31:01 +02:00
Michael Ventnor 1f7110d673 Bug 659549 - Tab bar scrolling using arrow buttons should use mozRequestAnimationFrame r=dao 2011-06-07 12:41:16 +10:00
Hiroyuki Ikezoe 0561afc8a3 Bug 582216 - Make sure that we set _scrollTarget in every case in order to address intermittent failures in tabbrowser overflow handling; r=dao 2011-03-16 18:01:34 -04:00
Ehsan Akhgari 9579bab7b4 Backed out changeset 75147c0a4b89 because it actually changes code, and is not test-only. a=silly-me 2011-03-16 18:03:35 -04:00
Hiroyuki Ikezoe 848e9b51d7 Bug 582216 - Make sure that we set _scrollTarget in every case in order to address intermittent failures in tabbrowser overflow handling; r=dao a=test-only 2011-03-16 18:01:34 -04:00
Simon Montagu a5ecce5d0f Bug 508816: remove browser workarounds. a=blocker 2011-02-07 09:59:32 +02:00