зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1735797 - Fix scrollbar caching on macOS. r=mstange
For that: * Remove support for caching resizer styles, since they don't seem common enough to warrant it, unlike all other scrollbar parts. * Make scrollcorners have pointer-events: none with overlay scrollbars, so that the setup works / we can assert that if we have overlay scrollbars then we don't care about the pointer-events value on ancestors. Differential Revision: https://phabricator.services.mozilla.com/D128772
This commit is contained in:
Родитель
78dd2046ab
Коммит
59c3527c15
|
@ -32,22 +32,13 @@ enum class AnonymousContentKey : uint8_t {
|
|||
|
||||
// all
|
||||
Type_ScrollCorner = 0x01,
|
||||
Type_Resizer = 0x02,
|
||||
Type_Scrollbar = 0x03,
|
||||
Type_ScrollbarButton = 0x04,
|
||||
Type_Slider = 0x05,
|
||||
Type_Scrollbar = 0x02,
|
||||
Type_ScrollbarButton = 0x03,
|
||||
Type_Slider = 0x04,
|
||||
|
||||
// scrollbar, scrollbarbutton, slider
|
||||
Flag_Vertical = 0x08,
|
||||
|
||||
// resizer
|
||||
// 3-bit bitfield in 0x38 storing dir="" and flip=""
|
||||
Flag_Resizer_Right = 0x08,
|
||||
Flag_Resizer_Bottom = 0x10,
|
||||
Flag_Resizer_BottomLeft = 0x18,
|
||||
Flag_Resizer_BottomRight = 0x20,
|
||||
Flag_Resizer_Bottom_Flip = 0x28,
|
||||
|
||||
// scrollbarbutton
|
||||
Flag_ScrollbarButton_Down = 0x10,
|
||||
Flag_ScrollbarButton_Bottom = 0x20,
|
||||
|
|
|
@ -5440,8 +5440,6 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
|||
if (neededAnonContent.contains(AnonymousContentType::Resizer)) {
|
||||
MOZ_ASSERT(!mIsRoot, "Root scroll frame shouldn't be resizable");
|
||||
|
||||
AnonymousContentKey key = AnonymousContentKey::Type_Resizer;
|
||||
|
||||
RefPtr<NodeInfo> nodeInfo;
|
||||
nodeInfo = nodeInfoManager->GetNodeInfo(
|
||||
nsGkAtoms::resizer, nullptr, kNameSpaceID_XUL, nsINode::ELEMENT_NODE);
|
||||
|
@ -5454,7 +5452,6 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
|||
case StyleResize::Horizontal:
|
||||
if (IsScrollbarOnRight()) {
|
||||
dir.AssignLiteral("right");
|
||||
key |= AnonymousContentKey::Flag_Resizer_Right;
|
||||
} else {
|
||||
dir.AssignLiteral("left");
|
||||
}
|
||||
|
@ -5464,18 +5461,13 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
|||
if (!IsScrollbarOnRight()) {
|
||||
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::flip, u""_ns,
|
||||
false);
|
||||
key |= AnonymousContentKey::Flag_Resizer_Bottom_Flip;
|
||||
} else {
|
||||
key |= AnonymousContentKey::Flag_Resizer_Bottom;
|
||||
}
|
||||
break;
|
||||
case StyleResize::Both:
|
||||
if (IsScrollbarOnRight()) {
|
||||
dir.AssignLiteral("bottomright");
|
||||
key |= AnonymousContentKey::Flag_Resizer_BottomRight;
|
||||
} else {
|
||||
dir.AssignLiteral("bottomleft");
|
||||
key |= AnonymousContentKey::Flag_Resizer_BottomLeft;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -5486,7 +5478,7 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
|||
u"_parent"_ns, false);
|
||||
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::clickthrough,
|
||||
u"always"_ns, false);
|
||||
aElements.AppendElement(ContentInfo(mResizerContent, key));
|
||||
aElements.AppendElement(mResizerContent);
|
||||
}
|
||||
|
||||
if (neededAnonContent.contains(AnonymousContentType::HorizontalScrollbar) &&
|
||||
|
|
|
@ -31,6 +31,9 @@ scrollbar[root="true"] {
|
|||
pointer-events: none;
|
||||
opacity: 0;
|
||||
}
|
||||
scrollcorner {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
slider {
|
||||
|
|
Загрузка…
Ссылка в новой задаче