Closed Bug 1241275 Opened 6 years ago Closed 6 years ago

Change the way -moz-window-dragging works

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox46 --- affected
firefox47 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(1 file)

In bug 1219215 we need a no-drag element to cancel out the drag region added by a sibling of the no-drag element's parent element, where that sibling comes *after* the parent in the frame tree.

I think the easiest way to achieve this is to make -moz-window-dragging a non-inherited property with three values: default, drag, no-drag. And then we build separate drag and no-drag regions and sub out the no-drag region at the end, so that no-drag always wins.
This adds the value -moz-window-dragging: default as the initial value of the property,
and makes it a [reset] property. This allows us to change the way the window dragging
region is calculated: Elements with -moz-window-dragging: no-drag will now always be
undraggable, even if they are overlapped by -moz-window-dragging: drag elements. That
way we can keep the region calculation simple and don't have to add code to respect
z-ordering.

Review commit: https://reviewboard.mozilla.org/r/32503/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/32503/
Attachment #8712623 - Flags: review?(roc)
Attachment #8712623 - Flags: review?(cam)
Comment on attachment 8712623 [details]
MozReview Request: Bug 1241275 - Change the way -moz-window-dragging works. r?dbaron, r?roc

https://reviewboard.mozilla.org/r/32503/#review29473

::: layout/base/nsDisplayList.h:615
(Diff revision 1)
>     * Adjusts mWindowDraggingRegion to take into account aFrame. If aFrame's
>     * -moz-window-dragging value is |drag|, its border box is added to the
>     * collected dragging region; if the value is |no-drag|, the border box is
>     * subtracted from the region.

Can you adjust this comment to say what happens when the value is "default"?
Attachment #8712623 - Flags: review?(cam) → review+
Comment on attachment 8712623 [details]
MozReview Request: Bug 1241275 - Change the way -moz-window-dragging works. r?dbaron, r?roc

https://reviewboard.mozilla.org/r/32503/#review29531
Gijs, can you finish and land this for me? I'm going away for two weeks. Sorry that I didn't finish it myself.
The comment just needs to be adjusted to say that framse with -moz-window-dragging: default don't influence the window dragging region at all.
(In reply to Markus Stange [:mstange] (away until Feb 15th) from comment #5)
> Gijs, can you finish and land this for me? I'm going away for two weeks.
> Sorry that I didn't finish it myself.

Yes, no worries!

> The comment just needs to be adjusted to say that framse with
> -moz-window-dragging: default don't influence the window dragging region at
> all.

Alright. I'll try to get this landed either this weekend or Monday at the latest. Needinfo to remind myself.
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(gijskruitbosch+bugs)
https://hg.mozilla.org/mozilla-central/rev/46c420b6e89d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Depends on: 1255989
No longer depends on: 1255989
You need to log in before you can comment on or make changes to this bug.