Bug 1508789 - Force 'pointer-events: auto' used value for root content. r=mstange

It seems that other browsers don't allow 'pointer-events: none' on the root content,
and this can cause us interoperability issues.

Differential Revision: https://phabricator.services.mozilla.com/D12500

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ryan Hunt 2018-11-22 14:16:14 +00:00
Родитель 2a90173ad1
Коммит 3bb5661553
1 изменённых файлов: 4 добавлений и 8 удалений

Просмотреть файл

@ -249,14 +249,10 @@ uint8_t
nsStyleUI::GetEffectivePointerEvents(nsIFrame* aFrame) const
{
if (aFrame->GetContent() && !aFrame->GetContent()->GetParent()) {
// The root element has a cluster of frames associated with it
// (root scroll frame, canvas frame, the actual primary frame). Make
// those take their pointer-events value from the root element's primary
// frame.
nsIFrame* f = aFrame->GetContent()->GetPrimaryFrame();
if (f) {
return f->StyleUI()->mPointerEvents;
}
// The root frame is not allowed to have pointer-events: none, or else
// no frames could be hit test against and scrolling the viewport would
// not work.
return NS_STYLE_POINTER_EVENTS_AUTO;
}
return mPointerEvents;
}