Bug
1856452: Make NonDraggableView opaque region limited to its bounds. r=mstange
NonDraggableView responds to an undocumented selector
_opaqueRectForWindowMoveWhenInTitlebar to determine if mouse downs
within its bounds should drag the window. Since some of our
NonDraggableViews are used to represent the tabs, which should prevent
window dragging, we want to return an NSRect here which represents only
the view's visible bounds. Prior to this patch, we were returing [self
visibleRect], which is calculated by the ancestor clip chain. That's
mostly what we want, but it relies upon the NonDraggableView clipping to
its own bounds. There is a property that sort-of conveys this,
clipsToBounds, but as documented it implies that it only affects the
display of subviews. Since we are already overridding this undocumented
method, we just return the view's bounds here instead of setting the
clipsToBounds property which implies that we are expecting to add
subviews to the NonDraggableViews. This keeps the complexity all in one
place.
Differential Revision: https://phabricator.services.mozilla.com/
D189866