Commit Graph

553 Commits

Author SHA1 Message Date
Mihai Alexandru Michis
9f81e46a34 Backed out 2 changesets (bug 1559690) for causing failures in browser_tabCloseSpacer.js CLOSED TREE
Backed out changeset 9f45982e7800 (bug 1559690)
Backed out changeset fdb96c16d976 (bug 1559690)
2019-06-26 21:04:20 +03:00
Emilio Cobos Álvarez
d4281c8529 Bug 1559690 - Make scroll port events use the same mechanism as scroll events. r=hiro
This prevents them from being called from layout and is more similar to what
WillPaintObservers did.

Differential Revision: https://phabricator.services.mozilla.com/D35604
2019-06-26 14:32:32 +02:00
Emilio Cobos Álvarez
1542425954 Bug 1559690 - Move scroll event declarations to nsGfxScrollFrame.cpp r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D35603
2019-06-26 14:32:32 +02:00
Botond Ballo
c0ca36e4fd Bug 1554813 - Size the scroll parts clip to the scroll frame's true outer size. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D33377

--HG--
extra : moz-landing-system : lando
2019-06-10 16:30:42 +00:00
Cameron McCormack
f5b7d1380b Bug 866102 - Implement -webkit-line-clamp. r=mats,emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D20115

--HG--
extra : moz-landing-system : lando
2019-05-09 02:32:30 +00:00
Emilio Cobos Álvarez
11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

Differential Revision: https://phabricator.services.mozilla.com/D28681

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Hiroyuki Ikezoe
7356d7a696 Bug 1544198 - Use the proper frame to get scroll-snap-type value on the root element. r=botond
Now scroll-snap-type property on body element doesn't affect scroll position
so that scrollTo-scrollBy-snaps.html is needed to be modified to specify
scroll-snap-type on html.

Differential Revision: https://phabricator.services.mozilla.com/D27987

--HG--
extra : moz-landing-system : lando
2019-04-23 01:16:02 +00:00
Hiroyuki Ikezoe
eb6519bbae Bug 1544198 - Split ScrolLFrameHelper::ComputeScrollSnapInto into two functions. r=botond
The one is for the scroll snap module v1 implementation, the other is for the
old scroll snap implementation.  Now both functions have the same pieces of
code to get scroll-snap-type values, but for v1 implemention in the next commit
we will use GetFrameForScrollSnap() to get the value instead.

Differential Revision: https://phabricator.services.mozilla.com/D27986

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:38 +00:00
Hiroyuki Ikezoe
7b325b6485 Bug 1544198 - Factor out the function to get the frame for scroll-snap-type and scroll-padding. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D27985

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:24 +00:00
Masayuki Nakano
2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

Differential Revision: https://phabricator.services.mozilla.com/D27476

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Hiroyuki Ikezoe
7b600a0531 Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
In the case where scroll-snap-type is specified for the scroll container, the
scroll-padding is also factored into in ScrollFrameHelper::ComputeScrollSnapInfo
which is called via ScrollFrameHelper::ScrollToWithOrigin.  It doesn't double
the scroll-padding value, but it's actually redundant, we should avoid it.
We could separate the functionality of ScrollToWithOrigin, one is to scroll
to a given element, the other is to scroll to a given position.  The former will
be used for Element.scrollIntoElement and relevant stuff, the latter will be
used for Element.scrollTo and relevant stuff.  That's being said, as of now, we
have still the old scroll snap implementation, so the separation will introduce
complexity, the separation should be done once after the old implementation
removed.

There are 9 call sites of nsIPresShell::ScrollContentIntoView:
  nsIPresShell::GoToAnchor
  nsIPresShell::ScrollToAnchor
  Element::ScrollIntoView
   We definitely needs scroll-padding and scroll-margin for these functions.

  nsCoreUtils::ScrollTo
   This is used for Accesible::ScrollTo which scrolls to a given accesible node,
   probably we should behave as what Element::ScrollIntoView does.

  Accessible::DispatchClickEvent
   Similar to the above, similated various mouse events on a given target node.

  PresShell::EventHandler::PrepareToUseCaretPosition
  PresShell::EventHandler::GetCurrentItemAndPositionForElement
   Both are for context menu, we shouldn't consider scroll-padding and
   scroll-margin.

  nsFormFillController::SetPopupOpen
   This is used for autocompletion popup, we shouldn't consider scroll-padding
   and scroll-margin.

  nsFocusManager::ScrollIntoView
   This is bit unfortunate, we should use scroll-padding and scroll-margin
   depending on call site of this function. Bug 1535232 is for this case.

cssom-view/scrollIntoView-scrollPadding.html which has some tests that is
actually testing scroll-padding with scrollIntoView passes with this change.

The reftest in this change is a test case that the browser navigates to an
element with specifying the anchor to the element.

Differential Revision: https://phabricator.services.mozilla.com/D23084

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:14 +00:00
Hiroyuki Ikezoe
ee992bd0bb Bug 1373835 - Cull out elements which will be invisible in the snapport for programatic scrolls. r=botond
As for scrolling on the compositor we don't cull out them since we don't know
the final snapport rect at the time when we send the information about
snapping to the compositor.  And we will handle it for APZ in bug 1531589.

https://drafts.csswg.org/css-scroll-snap-1/#snap-scope

Depends on D21632

Differential Revision: https://phabricator.services.mozilla.com/D21633

--HG--
extra : moz-landing-system : lando
2019-04-11 06:21:23 +00:00
Hiroyuki Ikezoe
eab0011ba9 Bug 1373835 - Make ComputeScrollSnapInfo a private method of ScrollFrameHelper. r=botond
Depends on D21626

Differential Revision: https://phabricator.services.mozilla.com/D21627

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:24 +00:00
Hiroyuki Ikezoe
66dd57767b Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
From the spec [1];

 Using the scroll-snap-type property on the relevant scroll container, the
 author can request a particular bias for the scrollport to land on a snap
 position after scrolling operations (including programmatic scrolls such
 as the scrollTo() method).

The target here are functions exposed in web contents other than
Element.scrollIntoView which will be changed in the next commit.

[1] https://drafts.csswg.org/css-scroll-snap-1/#overview

Depends on D21624

Differential Revision: https://phabricator.services.mozilla.com/D21625

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:04 +00:00
Botond Ballo
8095c8e25d Bug 1516056 - Rename ScrollFrameHelper::GetScrollRangeForClamping() to GetVisualScrollRange(). r=kats
Depends on D20279

Differential Revision: https://phabricator.services.mozilla.com/D20280

--HG--
extra : moz-landing-system : lando
2019-04-08 23:34:52 +00:00
Botond Ballo
d79e2f5b64 Bug 1516056 - Rename ScrollFrameHelper::GetScrollRange() to GetLayoutScrollRange(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D20279

--HG--
extra : moz-landing-system : lando
2019-04-08 23:34:43 +00:00
Hiroyuki Ikezoe
9db5bc51b8 Bug 1519013 - Shrink the content to display size if user has never changed the site resolution. r=botond
elementFromPoint-002.html, elementFromPoint-003.html and dialog-showModal.html
use document.elementFromPoint with a given point which is calculated from the
value returned by getBoundingClientRect() for a 100% width element.  Before
this change, the given point is outside of view because there is no viewport
meta tag in the documents so that elementFromPoint fails.  After this change, the
documents fit to the visual viewport so that elementFromPoint works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D16155

--HG--
extra : moz-landing-system : lando
2019-03-28 03:04:59 +00:00
Botond Ballo
573a6eaafa Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
This allows this enumeration to be used from nsIPresShell.h without introducing
a circular dependency.

Its new home in layout/base/ScrollTypes.h, included as mozilla/ScrollTypes.h.
Others similar enums can be added to that file if desired.

This patch also makes ScrollMode an enum class (as it's no longer nested
inside a class) and switches its enumerators to the |eName| naming convention.

Differential Revision: https://phabricator.services.mozilla.com/D24796

--HG--
extra : moz-landing-system : lando
2019-03-25 23:17:20 +00:00
Botond Ballo
e6c2c99584 Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
This patch renames nsIPresShell::SetPendingVisualScrollUpdate() to
ScrollToVisual(), and adds an instant vs. smooth option.

SetPendingVisualScrollUpdate() still exists, as a helper for the instant case.

Differential Revision: https://phabricator.services.mozilla.com/D24553

--HG--
extra : moz-landing-system : lando
2019-03-23 20:23:35 +00:00
Botond Ballo
902b978f7f Bug 1531535 - Extract an ApzSmoothScrollTo() helper function. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24552

--HG--
extra : moz-landing-system : lando
2019-03-23 20:23:20 +00:00
Hiroyuki Ikezoe
af78a85968 Bug 1532443 - Drop clampScrollPoistion stuff. r=kats
This was introduced in bug 726817 for B2G stuff and there is no call site of
SetClampScrollPosition now and the only one entry point to call the function
was nsIFrameLoader.clampScrollPosition which was removed in
https://hg.mozilla.org/mozilla-central/rev/cd9aace7bb96 .

ScrollFrameHelper::ShouldClampScrollPosition() had always returned true in both
cases of root and non-root scrollable frames. (In the case of non-root
scrollable, nsFrameLoader.mClampScrollPosition is initially set to true and
nobody changes the value)

Differential Revision: https://phabricator.services.mozilla.com/D22026

--HG--
extra : moz-landing-system : lando
2019-03-04 22:16:46 +00:00
Botond Ballo
5a7e4e2124 Bug 1528743 - Move the top-layer display items inside the async zoom container. r=mstange
This maintains the important invariant that layers that carry scroll metadata
for the RCD-RSF are inside the async zoom container.

Differential Revision: https://phabricator.services.mozilla.com/D22049

--HG--
extra : moz-landing-system : lando
2019-03-06 22:51:09 +00:00
Ryan Hunt
fc7e92ad83 Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D19872

--HG--
extra : moz-landing-system : lando
2019-02-15 01:25:55 +00:00
Hiroyuki Ikezoe
ff820309e3 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
This is what Chrome does.

documentElement-clientWidth-on-minimum-scale-size.tentative.html was the test
case for this but unfortunately it was disabled in bug 1515043. And it seems
that the test case failed on Android in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D19461

--HG--
extra : moz-landing-system : lando
2019-02-13 23:47:32 +00:00
Emilio Cobos Álvarez
12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Daniel Holbert
4147f36107 Bug 969874: Make scrollable frames derive their baseline from their scrolled content (unless their display value is block-inside). r=mats
Before this patch, we made scrollable frames derive their baseline from their
margin-box, because that's what the spec requires for scrollable inline-block
boxes. However, the spec now singles out inline-block as a special case, and
other sorts of scrollable inline-level containers are supposed to derive their
baseline from the scrolled content. So, this patch makes us do that, with an
exception for scrollable inline-block boxes.

For more info about the block-inside special case, see the end of the "block
containers" chunk here: https://drafts.csswg.org/css-align/#baseline-export
(Though that spec text may be a bit too specific, per my spec issue at
https://github.com/w3c/csswg-drafts/issues/3611 -- that's why this patch checks
for block-inside rather than inline-block.)

Differential Revision: https://phabricator.services.mozilla.com/D18481

--HG--
extra : moz-landing-system : lando
2019-02-06 00:22:56 +00:00
Daniel Holbert
3cee4428b6 Bug 1525133: Explicitly skip orthogonal-flow children when determining last-baseline of a block from its children. r=mats
Without the check that I'm adding in this patch, we'd violate the
"parallel writing mode" expectation of some baseline accessors
that we use in the now-guarded code. And we'd produce bogus layout
as a result.

The added assertions are just for good measure. The included testcase
causes us to fail both assertions, in a build that's missing the fix.

Differential Revision: https://phabricator.services.mozilla.com/D18715

--HG--
extra : moz-landing-system : lando
2019-02-05 19:45:46 +00:00
Ryan Hunt
6d38cefd3d Bug 1522264 - Translate the visual viewport offset to be relative to the scroll port. r=botond
This was lost in the change to only use the visual viewport if both the
size and offset were set.

Differential Revision: https://phabricator.services.mozilla.com/D17752

--HG--
extra : moz-landing-system : lando
2019-01-28 19:48:00 +00:00
Ryan Hunt
3e87663a7f Bug 1518640 - Use the visual viewport for anchor node selection. r=botond
--HG--
extra : rebase_source : 0f7038a4bf6b7d2a7958177b883c7fbb4130d288
extra : intermediate-source : 97681055c88c7af478467d6c76e227d0cb916aad
extra : source : 27bbb318ecb4f44c315f87584bdeb1b239d80cef
2019-01-22 13:37:16 -06:00
Csoregi Natalia
54be80a8cf Backed out 2 changesets (bug 1518640) for reftest failures on gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping.html. CLOSED TREE
Backed out changeset 27bbb318ecb4 (bug 1518640)
Backed out changeset 3b192e4631cc (bug 1518640)
2019-01-22 22:37:00 +02:00
Ryan Hunt
04f720e12c Bug 1518640 - Use the visual viewport for anchor node selection. r=botond
--HG--
extra : histedit_source : 44a540ddceb42939c124e51486c18856584de39a
2019-01-22 13:37:16 -06:00
Hiroyuki Ikezoe
496dff9a8b Bug 1423013 - Expand the layout viewport to the minimum scale size for overflow:hidden pages. r=botond,tnikkel
Depends on D15345

Differential Revision: https://phabricator.services.mozilla.com/D15347

--HG--
extra : moz-landing-system : lando
2019-01-15 09:48:18 +00:00
Oana Pop Rus
e6a470fee9 Backed out 3 changesets (bug 1423013) for failing at reftests/transform/compound-1a.html on a CLOSED TREE
Backed out changeset 91624c065046 (bug 1423013)
Backed out changeset 050a2ef2393d (bug 1423013)
Backed out changeset db57901030e9 (bug 1423013)
2019-01-15 09:35:57 +02:00
Hiroyuki Ikezoe
4faf5e4991 Bug 1423013 - Expand the layout viewport to the minimum scale size for overflow:hidden pages. r=botond,tnikkel
Depends on D15345

Differential Revision: https://phabricator.services.mozilla.com/D15347

--HG--
extra : moz-landing-system : lando
2019-01-15 03:28:10 +00:00
Jan Henning
79fe5e1e56 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D15691

--HG--
extra : moz-landing-system : lando
2019-01-11 19:50:24 +00:00
Ryan Hunt
43e96a0c82 Bug 1305957 part 7 - Adjust scroll offset to match change in relative position of scroll anchor after reflow. r=hiro,dbaron
This commit implements anchor offset adjustment. When the position of a frame
that is an anchor is changed during reflow, we notify the anchor container. The
anchor container will then post a reflow callback.

Then when reflow is completed, the anchor container will perform a scroll to
keep the anchor node in the same relative position.

Differential Revision: https://phabricator.services.mozilla.com/D13270

--HG--
extra : rebase_source : 9d40a5d5b73777d0da3799f162eeb85bb8e6d8f0
extra : source : d9052f7b34d9857863b66d64797f8b0b82504bec
2018-12-21 10:26:10 -06:00
Ryan Hunt
91f41f3a0a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
This commit adds a barebones class called 'ScrollAnchorContainer' that will
contain most of the logic for scroll anchoring. It is owned as a member of
ScrollFrameHelper, and has the same lifetime.

Differential Revision: https://phabricator.services.mozilla.com/D13267

--HG--
extra : rebase_source : 41f6f7691af60401f18f98a89f1878cfad2e74d3
extra : source : 3033401ef320414ef5f489c53526d015c38a89d7
2018-11-27 15:18:03 -06:00
Bogdan Tara
6d78d1e2c9 Backed out 15 changesets (bug 1305957) for ASAN failures CLOSED TREE
Backed out changeset 4d5eb85d3155 (bug 1305957)
Backed out changeset 51c86d025ecb (bug 1305957)
Backed out changeset d8eef8f3e396 (bug 1305957)
Backed out changeset 950bf6ad1ef2 (bug 1305957)
Backed out changeset b4cb2cbebdb6 (bug 1305957)
Backed out changeset bfca5019a9cc (bug 1305957)
Backed out changeset e76b842c7b7f (bug 1305957)
Backed out changeset d9445a5f3458 (bug 1305957)
Backed out changeset d9052f7b34d9 (bug 1305957)
Backed out changeset e7124fecb721 (bug 1305957)
Backed out changeset bdb766faa867 (bug 1305957)
Backed out changeset 3033401ef320 (bug 1305957)
Backed out changeset 6b96050386f6 (bug 1305957)
Backed out changeset c66c00f73296 (bug 1305957)
Backed out changeset 6bd0bdab93cb (bug 1305957)
2019-01-10 18:49:22 +02:00
Ryan Hunt
a2c95c01f0 Bug 1305957 part 7 - Adjust scroll offset to match change in relative position of scroll anchor after reflow. r=hiro,dbaron
This commit implements anchor offset adjustment. When the position of a frame
that is an anchor is changed during reflow, we notify the anchor container. The
anchor container will then post a reflow callback.

Then when reflow is completed, the anchor container will perform a scroll to
keep the anchor node in the same relative position.

Differential Revision: https://phabricator.services.mozilla.com/D13270

--HG--
extra : rebase_source : 44797fcf6585d5912f83baea90a8e554f39618b5
extra : histedit_source : c4354ba8aac99e0d083f40b515369db6a95f997d
2018-12-21 10:26:10 -06:00
Ryan Hunt
18d5058194 Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
This commit adds a barebones class called 'ScrollAnchorContainer' that will
contain most of the logic for scroll anchoring. It is owned as a member of
ScrollFrameHelper, and has the same lifetime.

Differential Revision: https://phabricator.services.mozilla.com/D13267

--HG--
extra : rebase_source : 4d58b51aa6b893392d7c152d27750ebda059f784
extra : histedit_source : 9a2841931c47c4358e15d2fa6514ed347e3d0dad
2018-11-27 15:18:03 -06:00
Hiroyuki Ikezoe
d95e67add7 Bug 1516368 - Align boolean member variables in ScrollFrameHelper. r=botond
Depends on D15336

Differential Revision: https://phabricator.services.mozilla.com/D15338

--HG--
extra : moz-landing-system : lando
2018-12-30 02:16:12 +00:00
Brian Hackett
490b175062 Bug 1044074 - Don't run resize or scroll events while documents have events suppressed, r=smaug.
--HG--
extra : rebase_source : 47b98b215d3131fa3e6e88948fdd67aaf41524a9
2018-12-18 15:38:45 -10:00
Hiroyuki Ikezoe
f0fe14fe8d Bug 1514679 - Drop aFirstPass from ReflowScrolledFrame. r=botond
It hasn't been used since bug 300030.

Depends on D14715

Differential Revision: https://phabricator.services.mozilla.com/D14716

--HG--
extra : moz-landing-system : lando
2018-12-17 21:54:41 +00:00
Hiroyuki Ikezoe
0a0f595df0 Bug 1514679 - Use layers::ScrollDirection instead of boolean. r=botond
Depends on D14713

Differential Revision: https://phabricator.services.mozilla.com/D14714

--HG--
extra : moz-landing-system : lando
2018-12-17 21:54:11 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kartikaya Gupta
c7c9b39313 Bug 1503029 - Ensure the slider frame is notified of APZ drag initiation. r=botond
This adds a notification from APZ to the scrollbar's slider frame to
inform it of APZ starting an async scrollbar drag. This is useful
because APZ can start a scrollbar drag and even change the scroll
position before the scrollbar frame even handles the mousedown event. In
such a case, the mousedown can land on where the scrollthumb *used to
be* before it was dragged away. This can result in scroll-to-click
behavior getting triggered and the scrollthumb glitching.

With this patch, the new notification follows the same path as the
request-repaint message, and so is guaranteed to arrive at the scrollbar
before any request-repaint messages. It sets some state that can be used
to correct the behaviour described above.

Differential Revision: https://phabricator.services.mozilla.com/D12364

--HG--
extra : moz-landing-system : lando
2018-11-22 18:00:49 +00:00
Emilio Cobos Álvarez
cf56163d41 Bug 1509044 - FrameLoader.clipSubdocument is unused. r=jwatt,smaug
Plus it generally doesn't work for e10s, etc. etc.

Differential Revision: https://phabricator.services.mozilla.com/D12547

--HG--
extra : moz-landing-system : lando
2018-11-21 20:06:15 +00:00
Ting-Yu Lin
1d9848a22a Bug 916972 - Eliminate nsIFrame::GetSplittableType() completely. r=mats,dholbert
Currently, GetSplittableType() is called only in
nsCSSFrameConstructor::CreateContinuingFrame(). The splittable concrete frames
should inherit from nsSplittableFrame, and must explicitly create continuing
frame in CreateContinuingFrame(). Thus, no need to maintain GetSplittableType().

Differential Revision: https://phabricator.services.mozilla.com/D10798

--HG--
extra : moz-landing-system : lando
2018-11-05 19:11:12 +00:00
Ryan Hunt
2226bcc8a3 Bug 1504220 - Move ScrollableLayerGuid, ViewID, ZoomConstraints from FrameMetrics.h r=botond
This commit attempts to lower the pain of modifying FrameMetrics.h.

It looks like most includes really only want ViewID or
ScrollableLayerGuid, so this commit factors them out into a separate
header. In the process FrameMetrics::ViewID is changed to
ScrollableLayerGuid::ViewID, which personally seems like a better
place for it now that we have RepaintRequest. Unfortunately that
requires a lot of places to be updated.

After this commit there are still a couple of major places that
FrameMetrics is included.
 * nsDisplayList.h
 * nsIScrollableFrame.h
 * Layers.h

Those are going to be more tricky or impossible to fix so they're
not in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D10722

--HG--
rename : gfx/layers/FrameMetrics.h => gfx/layers/ScrollableLayerGuid.h
rename : gfx/layers/FrameMetrics.h => gfx/layers/ZoomConstraints.h
extra : rebase_source : 29ac79f91460a181bf7437af5c371207e22858e2
extra : source : c2e70e531075493fc6e374dcec862827f0bc6e77
2018-11-01 15:15:46 -05:00
Ryan Hunt
1601a8bb80 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
This commit adds a scroll origin, nsGkAtoms::relative, which can be used to
mark main thread scrolling that can be combined with a concurrent APZ scroll.

The behavior of this is controlled by a pref, apz.relative-update. This pref
is initially activated and is intended as an aid to narrowing down causes
of regressions for users in bug reports.

Relative scroll updates work by tracking the last sent or accepted APZ
scroll offset. This is sent along with every FrameMetrics. Additionally,
a flag is added to FrameMetrics, mIsRelative, indicating whether the
scroll offset can be combined with a potential APZ scroll. When this
flag is set, AsyncPanZoomController will apply the delta between the sent
base scroll offset, and sent new scroll offset.

This flag is controlled by the last scroll origin on nsGfxScrollFrame. The
new origin, `relative`, is marked as being able to clobber APZ updates,
but can only be set if all scrolls since the last repaint request or
layers transaction have been relative.

Differential Revision: https://phabricator.services.mozilla.com/D8234

--HG--
extra : rebase_source : 51351a84c9cda228a0975e22eda3fd3bd8d261c4
extra : histedit_source : 4b564c19b16fe2bd26adc671b62b7cb6106e8163
2018-10-09 23:24:28 -05:00