Commit Graph
131 Commits
Author SHA1 Message Date
Mike Conley fb986a549b Bug 1387130 - Use original tabstrip scrolling behaviour when using scrollbuttons. r=dao
In bug 1356705, we switched scrollbox to use CSS smooth scroll when
the scrollbox is configured to scroll smoothly. This caused the tab
strip to scroll with a "pulse" when using the arrow scrollbuttons.
This is because we scroll by a single tab each time, as opposed to
scrolling by pixels.

This reverts part of bug 1356705 so that we use instant scrolling
instead of smooth scrolling in the scrollbuttons case, which returns
the original behaviour of the strip without the pulse.

MozReview-Commit-ID: D8QQ8kQ7AjM
2017-09-06 13:28:48 -04:00
Dão Gottwald 6133ef8fea Bug 1387716 - Remove ancient workaround for bug 341047. r=masayuki
_updateScrollButtonsDisabledState doesn't use nsIScrollBoxObject, so this shouldn't be a problem anymore.

MozReview-Commit-ID: DP7RD0lA7dQ
2017-08-05 14:43:41 +02:00
Dão Gottwald 1102c99c34 Bug 1387701 - Simplify lineScrollAmount. r=masayuki
MozReview-Commit-ID: 401ja5XzBpO
2017-08-05 12:17:11 +02:00
Dão Gottwald 4507460c0a Bug 1387084 - Use instant scroll behavior when doing pixel scrolling. r=Gijs
Touchmove and wheel events are sent frequently enough that smooth scroll behavior
prevents the expected pixel distance from being reached before the next event.

Also replace aSmoothScroll parameters with aInstant to better reflect how this
works: its purpose is to force instant scrolling, whereas omitting it falls back
to "auto" (which may mean instant or smooth depending on different factors).

The ensureElementIsVisible call from browser-customization.js can go away as
customize mode doesn't add padding around the window anymore.

Finally, remove the unused scrollPosition and scrollPaddingRect properties.

MozReview-Commit-ID: 3Ac7g6zZ0hW
2017-08-05 10:12:38 +02:00
Dão Gottwald 22471aea11 Bug 1356705 - Use CSS smooth scroll when smooth scrolling a XUL scrollbox. r=mconley
MozReview-Commit-ID: 4Cjr1MuSVkk
2017-08-02 16:50:02 -04:00
Dão Gottwald a4e8256282 Bug 1349555 - Implement most of the photon tab strip. r=johannh
MozReview-Commit-ID: 96ug22yZt5G
2017-08-03 09:15:23 +02:00
Wes Kocher 404dd8da6d Backed out 2 changesets (bug 1349555) for failures in viewport-units-css2-001.html a=backout
Backed out changeset 5f1e7e8de03f (bug 1349555)
Backed out changeset 3ef0f35adc9f (bug 1349555)

MozReview-Commit-ID: Ly8AeXQy5Mn
2017-08-02 15:22:58 -07:00
Dão Gottwald 9e9c95719b Bug 1349555 - Implement most of the photon tab strip. r=johannh
MozReview-Commit-ID: GmWBIdjNMkC
2017-08-02 15:06:10 +02:00
Sebastian Hengst 9fa8063d76 Backed out changeset c9594a10a88a (bug 1349555) for failing browser_windowopen_reflows.js. r=backout 2017-08-02 18:26:37 +02:00
Dão Gottwald e78546a45e Bug 1349555 - Implement most of the photon tab strip. r=johannh
MozReview-Commit-ID: GmWBIdjNMkC
2017-08-02 15:06:10 +02:00
Dão Gottwald 0f6b6d9e36 Bug 1376397 - Disable scroll buttons if there's space between the first or last element and the scrollbox edge. r=Gijs
MozReview-Commit-ID: 33D1kIQDC7w
2017-06-30 00:56:21 +02:00
Dão Gottwald 3581a930c9 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled r=mconley
MozReview-Commit-ID: HcOQ4W0Z4YP
2017-06-21 15:08:30 +02:00
Dão Gottwald b5f633252d Bug 1371620 - Make arrowscrollbox._canScrollToElement not flush styles. r=mconley
MozReview-Commit-ID: 1wfzHA9kOdE
2017-06-09 15:00:48 +02:00
Dão Gottwald 184e7d2a22 Bug 1371604 - Convert arrowscrollbox.scrollboxPaddingStart and arrowscrollbox._startEndProps from XBL properties to fields. r=mconley
MozReview-Commit-ID: 4QHvbZ5bvbK
2017-06-09 15:00:38 +02:00
Ryan VanderMeulen dbf4fc91e6 Backed out changeset 4b82f58570e4 (bug 1368208) for 508816-1.xul failures on a CLOSED TREE. 2017-05-31 17:39:30 -04:00
Dão Gottwald 3c8bd90432 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: 1LG3GDBFArv
2017-05-31 21:34:41 +02:00
Carsten "Tomcat" Book c2b715ca18 Backed out changeset 17792fad126f (bug 1368208) for reftestfailures in 508816-1.xul 2017-05-31 12:31:40 +02:00
Dão Gottwald 3bed1ecb16 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: EGqR2qU4EBu
2017-05-31 09:20:59 +02:00
Ryan VanderMeulen 3861771c3a Backed out changeset 9bda0f33f7b5 (bug 1368208) for 508816-1-ref.xul failures. 2017-05-30 16:20:03 -04:00
Dão Gottwald 1c1cf1d597 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: DPwyJgy3ray
2017-05-30 21:39:30 +02:00
Carsten "Tomcat" Book a782a7ea74 Backed out changeset 9fc7556f5386 (bug 1368208) for eslint failures 2017-05-30 15:47:21 +02:00
Dão Gottwald 3a1cb28a27 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: 8aDPxscBvGN
2017-05-30 14:51:49 +02:00
Sebastian Hengst fa841792b4 Backed out changeset 8901a598369f (bug 1368208) for eslint failure at toolkit/content/widgets/scrollbox.xml:195 (unexpected token .). r=backout 2017-05-30 14:27:42 +02:00
Dão Gottwald 6e0980727c Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: 9BA3u2gOawu
2017-05-30 12:07:49 +02:00
Phil Ringnalda b10c5faa9e Backed out changeset c0c635e938fa (bug 1368208) for eslint and reftest 508816-1-ref.xul failures
CLOSED TREE

MozReview-Commit-ID: LcPpCIciePj
2017-05-29 12:34:16 -07:00
Dão Gottwald b8ef925489 Bug 1368208 - Don't flush layout to determine whether scrollbox scroll buttons should be enabled/disabled. r=mconley
MozReview-Commit-ID: GfvqsJbNCCU
2017-05-29 20:50:23 +02:00
Dão Gottwald 5c0c676d05 Bug 1358453 - Throttle scroll button disabled state updates while scrolling to avoid flushing layout as much as possible. r=florian
MozReview-Commit-ID: 34w6M06ehRF
2017-05-25 15:08:54 +02:00
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