Bug 1429373 - Add a clarifying comment to the declaration of APZCTreeManager::SetTargetAPZC(). r=kats
MozReview-Commit-ID: CT1H5TH3UXn
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -261,16 +261,23 @@ public:
* to confirm the target of the input block. This is only needed in cases
* where the initial input event of the block hit a dispatch-to-content region
* but is safe to call for all input blocks. This function should always be
* invoked on the controller thread.
* The different elements in the array of targets correspond to the targets
* for the different touch points. In the case where the touch point has no
* target, or the target is not a scrollable frame, the target's |mScrollId|
* should be set to FrameMetrics::NULL_SCROLL_ID.
+ * Note: For mouse events that start a scrollbar drag, both SetTargetAPZC()
+ * and StartScrollbarDrag() will be called, and the calls may happen
+ * in either order. That's fine - whichever arrives first will confirm
+ * the block, and StartScrollbarDrag() will fill in the drag metrics.
+ * If the block is confirmed before we have drag metrics, some events
+ * in the drag block may be handled as no-ops until the drag metrics
+ * arrive.
*/
void SetTargetAPZC(
uint64_t aInputBlockId,
const nsTArray<ScrollableLayerGuid>& aTargets) override;
/**
* Helper function for SetTargetAPZC when used with single-target events,
* such as mouse wheel events.