Bug 1918762 - Use ElementState rather than the hover attribute to determine scrollbar hover state. r=mac-reviewers,mstange
That's what we use for painting in all platforms except macOS with overlay scrollbars, where we make it sticky. Make the stickiness more explicit (this also fixes the sticky state getting cleaned up too early). Differential Revision: https://phabricator.services.mozilla.com/D222161
This commit is contained in:
@@ -3409,7 +3409,8 @@ static void AppendToTop(nsDisplayListBuilder* aBuilder,
|
||||
struct HoveredStateComparator {
|
||||
static bool Hovered(const nsIFrame* aFrame) {
|
||||
return aFrame->GetContent()->IsElement() &&
|
||||
aFrame->GetContent()->AsElement()->HasAttr(nsGkAtoms::hover);
|
||||
aFrame->GetContent()->AsElement()->State().HasState(
|
||||
ElementState::HOVER);
|
||||
}
|
||||
|
||||
bool Equals(nsIFrame* A, nsIFrame* B) const {
|
||||
|
||||
Reference in New Issue
Block a user