nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values. For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.
MozReview-Commit-ID: 1N0AkCGo1ol
In bug 1359868 we started to do this, but we bounded the pre-render region for
the entire scrollbar by the widget bounds, which is not helpful for tall
scrollframes with short thumbs.
This time, we are bounding the pre-render region of the thumb only, so a small
thumb will always be completely painted.
MozReview-Commit-ID: 5LuP5Lfahdm
--HG--
extra : rebase_source : 3ab45f979160d7991aec71020cf57c9a1e57d1ce
Also add a comment to AsyncDragMetrics documenting that mScrollbarDragOffset
is relative to the thumb's start offset.
MozReview-Commit-ID: uipsOCzs2N
--HG--
extra : rebase_source : 25183e22cb7ffb9995a2594d6aea106cdef7924a
To conserve space in LayerAttributes, we only store the extents along the
relevant axis.
MozReview-Commit-ID: GAL8Oa2NOde
--HG--
extra : rebase_source : 9420d0fb36175e190cbff6e162fd41d8e5240c81
This flag is set to false if there are any conditions that only the main
thread knows about that prevent the thumb from being async-dragged.
MozReview-Commit-ID: Gl7f7bY0QnA
--HG--
extra : rebase_source : 60ab680a3995e3b5c0e1b4482ca0e7142352bbd2
The patch also renames Layer::SetScrollbarData() to Layer::SetScrollThumbData()
for clarity.
MozReview-Commit-ID: DVwJ3DMl3Zs
--HG--
extra : rebase_source : 7b2bfccf1351c82bb16296635e69d5488c87a50f
This avoids conflicts with mozilla::dom::FrameType.
MozReview-Commit-ID: 7aEMbHRaTFk
--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
Supporting custom scrollbar mediators would require having custom logic in APZ
for each custom mediator. Since custom mediators are only used by legacy XUL
elements (<listbox> and <tree>) that isn't worth implementing.
MozReview-Commit-ID: KtCUvtiR1qn
--HG--
extra : rebase_source : dfd301da4d6877dd636c9719df46409db260d94c
This is the bulk of the changes.
- DisplayItemScrollClip is removed. Instead, we will have 1) ActiveScrolledRoot
and 2) DisplayItemClipChain.
- ActiveScrolledRoot points to a scroll frame and allows traversing up the
scroll frame chain.
- DisplayItemClipChain is a linked list of clips, each clip being associated
with the ActiveScrolledRoot that moves this clip.
- Each display item has an ActiveScrolledRoot and a clip chain.
- nsDisplayItem::GetClip returns the item of the clip chain that scrolls with
the item's ASR. The separation between "regular clip" and "scroll clips"
mostly goes away.
- Tracking clips in the display list builder's clip state happens very
similarly to how regular clips used to be tracked - there's a clip chain for
content descendants and a clip chain for containing block descendants. These
clip chains are intersected to create the combined clip chain.
- There are strict rules for the ASR of a container item: A container item's
ASR should be the innermost ASR which the item has finite clipped bounds with
respect to.
- At some point in the future, ASRs and AGRs should be reunified, but I haven't
done that yet, because I needed to limit the scope of the change.
MozReview-Commit-ID: KYEpWY7qgf2
--HG--
extra : rebase_source : c727f6300a35463750639e165bfa37374c06b851
During the refactoring of nsSliderFrame::SetCurrentPositionInternal in Bug 957445, one
of the two calls to nsSliderFrame::UpdateAttribute was missed. This resulted in the position,
identified with nsGkAtoms::curpos, not being updated immediately after the call to
nsSliderFrame::SetCurrentThumbPosition
MozReview-Commit-ID: 6gedouG4OFX
--HG--
extra : rebase_source : dd29d90e6f10be87f652241ad138d4533bda1010
In cases where a mouse click that starts a scrollbar drag is also what
layerizes the scroll frame, the StartAsyncScrollbarDrag message needs to
arrive after the layer transaction. This patch ensures it does.
MozReview-Commit-ID: A02qRb6yWxg
--HG--
extra : rebase_source : 3517e8c8a578a0bd257a80bb8cb81303d171bb6c
test_scroll_snapping_scrollbars.html is failing when apz.drag.enabled
is true because synthesizeMouse does not route events through APZ,
meaning that the drag is never handled by APZ or Gecko.
Resolve this by adding a check that mHandledByApz flag is true for
WidgetGUIEvent, and handle in Gecko if that is not the case.
MozReview-Commit-ID: IrxVLxqs64V
--HG--
extra : rebase_source : c76e9fed3dcab806b17e85740c94339ac0e7ccca
Fix thumb position determination in these places:
- nsSliderFrame::StartAPZDrag() -- Constrain sliderTrack using
GetXULClientRect() to match dimensions used in
SetCurrentThumbPosition() and DoXULLayout(). This is what caused
the scaling/offset mismatch.
- nsSliderFrame::StartAPZDrag() -- Adjust nonsensical calculation of
cssSliderTrack. Should be sliderFrame + scrollbarFramePosition -
compositionBoundsPosition, to get coordinates relative to the same
region as that of APZ event coordinates.
- AsyncDragMetrics -- Make mScrollTrack and mScrollbarDragOffset float
instead of int coordinates.
- AsyncPanZoomController::HandleDragEvent() -- Use
GetAxisLength(scrollTrack) instead of GetAxisEnd(scrollTrack) in
calculation of scrollMax.
- AsyncPanZoomController::HandleDragEvent() -- Only change position on
MOUSE_MOVE.
Additional refactors:
- Rename HitTestingTreeNode::GetScrollSize() to GetScrollThumbLength(),
along with related functions/variables.
- Rename AsyncPanZoomController::GetAxisSize() to GetAxisLength().
- Rename cf to scrollFrame in nsSliderFrame::StartAPZDrag().
MozReview-Commit-ID: CIsU8Pj6qfa
--HG--
extra : rebase_source : 29548fb95ec3e958d903d964753857ee949753ba
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.
As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
Written purely with sed, over .h and .cpp files in layout/.
(While this wasn't explicitly reviewed, I'm considering it as r=dholbert
based on the request in comment 47 in the bug.)
MozReview-Commit-ID: 6Q0F4ViOyjJ
Written purely with sed, over .h and .cpp files in layout/, except for
the removal of one comment change in nsSliderFrame.cpp.
MozReview-Commit-ID: 2jpzaby0S9r
This is a manual subset of changes written with sed, over .h and .cpp
files in layout/.
This also renames a static method on nsSprocketLayout.
Note that nsFlexContainerFrame and nsRangeFrame also have IsHorizontal
methods that are not renamed here, but this can be found to be
relatively safe because none of the IsHorizontal methods are virtual.
MozReview-Commit-ID: Jsdy7I4Q7mX