author | Botond Ballo <botond@mozilla.com> |
Fri, 21 Apr 2017 13:59:32 -0400 | |
changeset 354716 | ef85518ce6ba18f0c001c3dcbaa96b49d68186d1 |
parent 354715 | 687a8e437cdaa14d72b1c2922131fad736133389 |
child 354717 | 9be73bee2f91dc41116caad6d29341b66f0d21b2 |
push id | 31711 |
push user | cbook@mozilla.com |
push date | Tue, 25 Apr 2017 09:24:00 +0000 |
treeherder | mozilla-central@a30dc237c3a6 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | kats |
bugs | 1355374 |
milestone | 55.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -406,25 +406,16 @@ public: FrameMetrics::ViewID GetScrollbarTargetContainerId() const { MOZ_ASSERT(IsValid()); return mLayer->GetScrollbarTargetContainerId(); } - int32_t GetScrollThumbLength() const - { - if (GetScrollbarDirection() == ScrollDirection::VERTICAL) { - return mLayer->GetVisibleRegion().GetBounds().height; - } else { - return mLayer->GetVisibleRegion().GetBounds().width; - } - } - bool IsScrollbarContainer() const { MOZ_ASSERT(IsValid()); return mLayer->IsScrollbarContainer(); } FrameMetrics::ViewID GetFixedPositionScrollContainerId() const {
--- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -490,17 +490,16 @@ APZCTreeManager::PrepareNodeForLayer(con AttachNodeToTree(node, aParent, aNextSibling); node->SetHitTestData( GetEventRegions(aLayer), aLayer.GetTransformTyped(), aLayer.GetClipRect() ? Some(ParentLayerIntRegion(*aLayer.GetClipRect())) : Nothing(), GetEventRegionsOverride(aParent, aLayer)); node->SetScrollbarData(aLayer.GetScrollbarTargetContainerId(), aLayer.GetScrollbarDirection(), - aLayer.GetScrollThumbLength(), aLayer.IsScrollbarContainer()); node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId()); return node; } AsyncPanZoomController* apzc = nullptr; // If we get here, aLayer is a scrollable layer and somebody // has registered a GeckoContentController for it, so we need to ensure @@ -680,17 +679,16 @@ APZCTreeManager::PrepareNodeForLayer(con GetEventRegionsOverride(aParent, aLayer)); } // Note: if layer properties must be propagated to nodes, RecvUpdate in // LayerTransactionParent.cpp must ensure that APZ will be notified // when those properties change. node->SetScrollbarData(aLayer.GetScrollbarTargetContainerId(), aLayer.GetScrollbarDirection(), - aLayer.GetScrollThumbLength(), aLayer.IsScrollbarContainer()); node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId()); return node; } template<typename PanGestureOrScrollWheelInput> static bool WillHandleInput(const PanGestureOrScrollWheelInput& aPanInput)
--- a/gfx/layers/apz/src/HitTestingTreeNode.cpp +++ b/gfx/layers/apz/src/HitTestingTreeNode.cpp @@ -23,17 +23,16 @@ namespace layers { HitTestingTreeNode::HitTestingTreeNode(AsyncPanZoomController* aApzc, bool aIsPrimaryHolder, uint64_t aLayersId) : mApzc(aApzc) , mIsPrimaryApzcHolder(aIsPrimaryHolder) , mLayersId(aLayersId) , mScrollViewId(FrameMetrics::NULL_SCROLL_ID) , mScrollDir(ScrollDirection::NONE) - , mScrollThumbLength(0) , mIsScrollbarContainer(false) , mFixedPosTarget(FrameMetrics::NULL_SCROLL_ID) , mOverride(EventRegionsOverride::NoOverride) { if (mIsPrimaryApzcHolder) { MOZ_ASSERT(mApzc); } MOZ_ASSERT(!mApzc || mApzc->GetLayersId() == mLayersId); @@ -92,41 +91,33 @@ HitTestingTreeNode::SetLastChild(HitTest aChild->SetApzcParent(parent); } } } void HitTestingTreeNode::SetScrollbarData(FrameMetrics::ViewID aScrollViewId, ScrollDirection aDir, - int32_t aScrollThumbLength, bool aIsScrollContainer) { mScrollViewId = aScrollViewId; mScrollDir = aDir; - mScrollThumbLength = aScrollThumbLength; mIsScrollbarContainer = aIsScrollContainer; } bool HitTestingTreeNode::MatchesScrollDragMetrics(const AsyncDragMetrics& aDragMetrics) const { return ((mScrollDir == ScrollDirection::HORIZONTAL && aDragMetrics.mDirection == AsyncDragMetrics::HORIZONTAL) || (mScrollDir == ScrollDirection::VERTICAL && aDragMetrics.mDirection == AsyncDragMetrics::VERTICAL)) && mScrollViewId == aDragMetrics.mViewId; } -LayerIntCoord -HitTestingTreeNode::GetScrollThumbLength() const -{ - return mScrollThumbLength; -} - bool HitTestingTreeNode::IsScrollbarNode() const { return mIsScrollbarContainer || (mScrollDir != ScrollDirection::NONE); } FrameMetrics::ViewID HitTestingTreeNode::GetScrollTargetId() const
--- a/gfx/layers/apz/src/HitTestingTreeNode.h +++ b/gfx/layers/apz/src/HitTestingTreeNode.h @@ -88,17 +88,16 @@ public: const Maybe<ParentLayerIntRegion>& aClipRegion, const EventRegionsOverride& aOverride); bool IsOutsideClip(const ParentLayerPoint& aPoint) const; /* Scrollbar info */ void SetScrollbarData(FrameMetrics::ViewID aScrollViewId, ScrollDirection aDir, - int32_t aScrollThumbLength, bool aIsScrollContainer); bool MatchesScrollDragMetrics(const AsyncDragMetrics& aDragMetrics) const; LayerIntCoord GetScrollThumbLength() const; bool IsScrollbarNode() const; FrameMetrics::ViewID GetScrollTargetId() const; /* Fixed pos info */ @@ -130,17 +129,16 @@ private: uint64_t mLayersId; // This is set for both scroll track and scroll thumb Container layers, and // represents the scroll id of the scroll frame scrolled by the scrollbar. FrameMetrics::ViewID mScrollViewId; // This is set for scroll thumb Container layers only. ScrollDirection mScrollDir; - int32_t mScrollThumbLength; // This is set for scroll track Container layers only. bool mIsScrollbarContainer; FrameMetrics::ViewID mFixedPosTarget; /* Let {L,M} be the {layer, scrollable metrics} pair that this node * corresponds to in the layer tree. mEventRegions contains the event regions