This patch changes the zoom behavior to always be routed through the frontend
Zoom Actor. In the existing code, the ZoomChangeUsingMouseWheel event is sent
as an after-the-fact notification of the zoom being modified directly. This
part of the patch supplements the existing event with 2 new events that
trigger the frontend to do the +/- 10% math in ChangeFullZoom and
ChangeTextZoom. The next part of the patch supplies that logic in the frontend
Zoom Actor.
This also changes the handling of events from the zoom in/out keys. Before,
those keys would only change full zoom levels. Now, they will respect the
full zoom vs text zoom toggle.
Differential Revision: https://phabricator.services.mozilla.com/D59259
--HG--
extra : moz-landing-system : lando
This patch changes the zoom behavior to always be routed through the frontend
Zoom Actor. In the existing code, the ZoomChangeUsingMouseWheel event is sent
as an after-the-fact notification of the zoom being modified directly. This
part of the patch supplements the existing event with 2 new events that
trigger the frontend to do the +/- 10% math in ChangeFullZoom and
ChangeTextZoom. The next part of the patch supplies that logic in the frontend
Zoom Actor.
This also changes the handling of events from the zoom in/out keys. Before,
those keys would only change full zoom levels. Now, they will respect the
full zoom vs text zoom toggle.
Differential Revision: https://phabricator.services.mozilla.com/D59259
--HG--
extra : moz-landing-system : lando
This patch changes the zoom behavior to always be routed through the frontend
Zoom Actor. In the existing code, the ZoomChangeUsingMouseWheel event is sent
as an after-the-fact notification of the zoom being modified directly. This
part of the patch supplements the existing event with 2 new events that
trigger the frontend to do the +/- 10% math in ChangeFullZoom and
ChangeTextZoom. The next part of the patch supplies that logic in the frontend
Zoom Actor.
This also changes the handling of events from the zoom in/out keys. Before,
those keys would only change full zoom levels. Now, they will respect the
full zoom vs text zoom toggle.
Differential Revision: https://phabricator.services.mozilla.com/D59259
--HG--
extra : moz-landing-system : lando
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.
But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.
Differential Revision: https://phabricator.services.mozilla.com/D55316
--HG--
extra : moz-landing-system : lando
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D49056
--HG--
extra : moz-landing-system : lando
Chrome and old Edge at least seem to have this behavior, and this way the testcase on the bug doesn't trigger click anymore since
we enter dnd mode and get dragleave etc. events.
Manually tested on linux and Windows, and annyg tested on Mac
Update test_dragstart.html's draggable=true test to follow the pattern used by other tests
Differential Revision: https://phabricator.services.mozilla.com/D48208
--HG--
extra : moz-landing-system : lando
Chrome and old Edge at least seem to have this behavior, and this way the testcase on the bug doesn't trigger click anymore since
we enter dnd mode and get dragleave etc. events.
Manually tested on linux and Windows, and annyg tested on Mac
Differential Revision: https://phabricator.services.mozilla.com/D48208
--HG--
extra : moz-landing-system : lando
Converted the following to StaticPrefs so that we can easily test variations:
NS_GC_DELAY
NS_SHRINK_GC_BUFFERS_DELAY
NS_FIRST_GC_DELAY
NS_FULL_GC_DELAY
NS_INTERSLICE_GC_DELAY
NS_USER_INTERACTION_INTERVAL
Differential Revision: https://phabricator.services.mozilla.com/D43112
--HG--
extra : moz-landing-system : lando
PresShell::EventHandler::HandleEventWithCurrentEventInfo is the only possible
place will do such handling; other places pass either a nullptr or a
non-MouseDown/Up event.
Differential Revision: https://phabricator.services.mozilla.com/D32431
--HG--
extra : moz-landing-system : lando
Additionally, this patch makes `nsContentUtils::DispatchXULCommand()` because
it guarantees the lifetime of **only** `PresShell` in it. So, we need to check
the lifetime of each argument at each caller here.
Differential Revision: https://phabricator.services.mozilla.com/D29199
--HG--
extra : moz-landing-system : lando
So, this patch makes all caller of it safe including its arguments unless
they come from other methods.
Differential Revision: https://phabricator.services.mozilla.com/D27225
--HG--
extra : moz-landing-system : lando
And for now, start blocking custom cursors that are larger than 64 pixels.
I wish I knew how to add a test for this, but I tested manually using the
test-case from bug 1518189 with and without hidpi.
We always treat the cursor image size as CSS pixels (and upscale it to device
pixels in HiDPI). We have bugs to stop doing that though (bug 1425694).
Differential Revision: https://phabricator.services.mozilla.com/D18671
--HG--
extra : moz-landing-system : lando
The only reason it was on style_traits is so that they could use it from some
other crates, but Servo eventually ends up getting the value from an integer, so
may as well pass it around and do that in the end of the process anyway.
Differential Revision: https://phabricator.services.mozilla.com/D16557
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
We should set the 'mGestureDownPoint' correctly when receiving 'touchstart' so that we can
distinguish whether the 'touchend' comes from dragging or simply touching by calling
'IsEventOutsideDragThreshold()'.
Differential Revision: https://phabricator.services.mozilla.com/D11395
--HG--
extra : moz-landing-system : lando
This patch makes EventStateManager handle middle click paste as a default
action.
Unfortunately, we cannot remove the call of HandleMiddleClickPaste() in
EditorEventListener because it's important to consume middle click event
before any elements in the editor. For example, if clicked HTMLEditor has
non-editable <a href> element, middle click event needs to be handled by the
editor rather than contentAreaUtils which handles click events of <a href>
elements. The cause of this kind of issues is, any click event handlers
which handle non-primary button events still listen to "click" events.
Therefore, this patch makes HandleMiddleClickPaste() do nothing if the mouseup
event is fired on an editor.
Differential Revision: https://phabricator.services.mozilla.com/D7855
--HG--
extra : moz-landing-system : lando
EventStateManager needs to handle middle click paste without editor.
Therefore, the handler should be in EventStateManager.
Differential Revision: https://phabricator.services.mozilla.com/D7852
--HG--
extra : moz-landing-system : lando
EventStateManager::InitAndDispatchClickEvent() sends given nsEventStatus to
nsIPresShell::HandleEventWithTarget(). Then, it sends the status to
EventStateManager::PreHandleEvent() before dispatching the event. At this
time, EventStateManager::PreHandleEvent() resets the state to
nsEventStatus_eIgnore. Therefore, for example, if eMouseClick event is
consumed but eMouseAuxClick is ignored, the event status result is
nsEventStatus_eIgnore. So, neither DispatchClickEvents() nor
PostMouseUpEventHandler() cannot check whether at least one click event
is consumed.
This patch makes EventStateManager::InitAndDispatchClickEvent() sends
local variable of nsEventStatus to nsIPresShell::HandleEventWithTarget().
Then, merge the result with current status.
If we'd change nsEventStatus to enum class, we could make this change as
custom "operator|=" or something.
Differential Revision: https://phabricator.services.mozilla.com/D7850
--HG--
extra : moz-landing-system : lando
This patch splits EventStateManager::CheckForAndDispatchClick(). One is for
handling default action of eMouseUp, the other is for dispatching click events.
This makes it easier to add other default actions after dispatching click
events.
Differential Revision: https://phabricator.services.mozilla.com/D7849
--HG--
extra : moz-landing-system : lando