This matches other browsers.
Keep the restriction just to chrome nodes, and in that case, avoid getting into
the broken state, which is what causes the issue. I'm not sure if this even
matters anymore given e10s but...
Differential Revision: https://phabricator.services.mozilla.com/D57475
--HG--
extra : moz-landing-system : lando
`synthesizePlainDragAndDrop()` synthesizes drag events with `DataTransfer`
object which is set to `DragEvent.dataTransfer` of `dragstart` after starting
drag session explicitly. However, this causes
`EventStateManager::DoDefaltDragStart()` does not initialize `nsIDragService`
instance. Therefore, synthesized drag events cannot work with editor because
`DragEvent::GetMozSourceNode()` returns `nullptr` due to
`nsIDragSession::GetSourceNode()` returning `nullptr`.
On the other hand, synthesized drag events cannot use
`nsIDragService::InvodeDragSession()` normally because of hitting an assertion.
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/widget/nsBaseDragService.cpp#230-233
This patch does:
- mark drag events caused by synthesized mouse events as "synthesized for tests"
- make `synthesizePlainDragAndDrop()` stop using
`nsIDragService.startDragSession()`
- make `nsBaseDragService` initialize and start session even for synthesized
`dragstart` event
- make `synthesizePlainDragAndDrop()` stop synthesizing drag events with
`DataTransfer` object since it's normal behavior and it'll be initialized
with `nsIDragService::GetDataTransfer()`
- make `nsBaseDragService` store `effectAllowed` for the session only when
it's synthesized session because it's required at initializing synthesized
default `dropEffect` value of `dragenter`, `dragover`, `dragexit` and `drop`
events' `dataTransfer`
- make all tests which use `nsIDragService.startDragSession()` use new
API, `nsIDragService.startDragSessionForTests()` to initialize session's
`effectAllowed` value
- make `EventStateManager::PostHandleEvent()` set drag end point of the test
session to `eDrop` event's screen point
- make `synthesizePlainDragAndDrop()` set drag end point of the session if
it does not synthesize `drop` event because following `endDragSession()`
use it at dispatching `dragend` event on the source element
Additionally, this adds `dumpFunc` new param to `synthesizePlainDragAndDrop()`
because it's really useful to investigate the reason why requesting DnD isn't
performed as expected.
Differential Revision: https://phabricator.services.mozilla.com/D57425
--HG--
extra : moz-landing-system : lando
This change effectively disallows sticky elements to enlarge overflow
area. That is, the position of a sticky element will be bounded by the
union of scrolled frame's border-box and the overflow area created by
other non-sticky elements within the same block formatting context.
This makes Firefox's position:sticky elements behaves like Google Chrome
in this respect.
Differential Revision: https://phabricator.services.mozilla.com/D54345
--HG--
extra : moz-landing-system : lando
This change effectively disallows sticky elements to enlarge overflow
area. That is, the position of a sticky element will be bounded by the
union of scrolled frame's border-box and the overflow area created by
other non-sticky elements within the same block formatting context.
This makes Firefox's position:sticky elements behaves like Google Chrome
in this respect.
Differential Revision: https://phabricator.services.mozilla.com/D54345
--HG--
extra : moz-landing-system : lando
bug 1598755 comment 1 contains an analysis to align wpt's test results
with our own reftest framework, so it is ok to remove these reftests.
In this patch, the manual modifications are
1. removing `os.path.join("selector"),` in import-tests.py, and
2. removing relevant annotations in failures.list.
Others parts are generated by running import-tests.py on a wpt
repository with commit 15f199c91a72b0d51bf0a12b3b77827ecb5051ff.
Depends on D58023
Differential Revision: https://phabricator.services.mozilla.com/D58024
--HG--
extra : moz-landing-system : lando
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.
Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:
* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.
Differential Revision: https://phabricator.services.mozilla.com/D56440
--HG--
extra : moz-landing-system : lando
The two masks are used only in nsBlockFrame::Init, so they should be
defined closer to their usage.
Note that 'constexpr' declared on functions implies 'inline'.
Differential Revision: https://phabricator.services.mozilla.com/D57724
--HG--
extra : moz-landing-system : lando
Changes:
Mark this particular failure with permissive fuzzy-if to be investigated at a later time. In the meantime this will permit both ubuntu16/18 to pass the tests.
Differential Revision: https://phabricator.services.mozilla.com/D57753
--HG--
extra : moz-landing-system : lando
Changes:
This test is a permafail on ubuntu1804 across all build types and is one of the remaining tests in mochitest-e10s to be greened up.
Mark it with a `fail-if` in case in the future this test begins passing again.
Differential Revision: https://phabricator.services.mozilla.com/D57697
--HG--
extra : moz-landing-system : lando
Changes:
Marking the test with a permissive `fuzzy-if` to accommodate both ubuntu1804 and ubuntu1604; fuzzy value will be tightened once migration is complete.
Differential Revision: https://phabricator.services.mozilla.com/D57728
--HG--
extra : moz-landing-system : lando
In a follow-up commit a new `ComparePoints` method with cleaner
arguments and return value will be added.
Differential Revision: https://phabricator.services.mozilla.com/D55295
--HG--
extra : moz-landing-system : lando
We are going to introduce a new function in Document in this commit series,
which enumerates all child documents regardless of whether it's in the same
process, in content processes or in out-of-process iframes. The function takes
std::functions, but I don't have any good ideas to convert lambda functions with
capturing variables to function pointer.
Differential Revision: https://phabricator.services.mozilla.com/D57434
--HG--
extra : moz-landing-system : lando
On GTK changing gtk-enable-animation in a process doesn't affect in different
processes for some reasons. So we take the same approach as what we did for
OSX[1] that is when SetPrefersReducedMotionOverrideForTest is called we set the
given value as a cache in the parent process and send a notification to system
as if the value changed thus the notification kicks PBroser.ThemeChanged to
update the cache in the content process, thus we can use the cache value on
querying the corresponding value in the content process.
[1] https://hg.mozilla.org/mozilla-central/rev/67a5acf7363d
Differential Revision: https://phabricator.services.mozilla.com/D57260
--HG--
extra : moz-landing-system : lando
We end up calling RebuildAllStyleData with RecascadeSubtree and
NS_STYLE_HINT_REFLOW in nsPresContext::FlushPendingMediaFeatureValuesChanged.
Differential Revision: https://phabricator.services.mozilla.com/D57259
--HG--
extra : moz-landing-system : lando
We are going to introduce a new function in Document in this commit series,
which enumerates all child documents regardless of whether it's in the same
process, in content processes or in out-of-process iframes. The function takes
std::functions, but I don't have any good ideas to convert lambda functions with
capturing variables to function pointer.
Differential Revision: https://phabricator.services.mozilla.com/D57434
--HG--
extra : moz-landing-system : lando
On GTK changing gtk-enable-animation in a process doesn't affect in different
processes for some reasons. So we take the same approach as what we did for
OSX[1] that is when SetPrefersReducedMotionOverrideForTest is called we set the
given value as a cache in the parent process and send a notification to system
as if the value changed thus the notification kicks PBroser.ThemeChanged to
update the cache in the content process, thus we can use the cache value on
querying the corresponding value in the content process.
[1] https://hg.mozilla.org/mozilla-central/rev/67a5acf7363d
Differential Revision: https://phabricator.services.mozilla.com/D57260
--HG--
extra : moz-landing-system : lando
We end up calling RebuildAllStyleData with RecascadeSubtree and
NS_STYLE_HINT_REFLOW in nsPresContext::FlushPendingMediaFeatureValuesChanged.
Differential Revision: https://phabricator.services.mozilla.com/D57259
--HG--
extra : moz-landing-system : lando
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk. Just use `flow` since it doesn't simplify the layout code as much.
Differential Revision: https://phabricator.services.mozilla.com/D45973
--HG--
extra : moz-landing-system : lando
We also need to adjust the scroll range we use. We do this by adding GetScrollRangeForUserInputEvents which just uses the range that GetAvailableScrollingDirectionsForUserInputEvents computed.
This should give two improvements:
1) CanScrollOn will not report that the user can scroll in an overflow hidden direction.
2) CanScrollOn will report that the user can scroll in an overflow hidden direction if the document is pinch zoomed in so that the user can scroll around the layout viewport.
Differential Revision: https://phabricator.services.mozilla.com/D56301
--HG--
extra : moz-landing-system : lando
This is similar to GetAvailableScrollingDirections but also takes into account any resolution.
Differential Revision: https://phabricator.services.mozilla.com/D57610
--HG--
extra : moz-landing-system : lando
Changes:
Most tests have smaller value for the `minDiff` side of things, and a slightly larger value for the `maxPixelCount` side of things when ubunt1804 runs the test. Adjust the expectation so that ubuntu1604 and ubuntu1804 both pass for the time being, then tighten the values once ubuntu1604 is decommissioned.
Differential Revision: https://phabricator.services.mozilla.com/D57560
--HG--
extra : moz-landing-system : lando
Changes:
As with other ubuntu1804 reftests, the difference counts need to be updated when run with `webrender`. Once migration is complete, tighten the values.
Differential Revision: https://phabricator.services.mozilla.com/D57604
--HG--
extra : moz-landing-system : lando
Changes:
Some tests in `layout/reftests/svg/text/reftests.list` now pass unconditionally when run on ubuntu1804. Permit pixel differential value of 0 for these tests while ubuntu1604 and ubutnu1804 coexist, leave the bug open then once the migration is complete look to remove the redundant annotation.
Differential Revision: https://phabricator.services.mozilla.com/D57546
--HG--
extra : moz-landing-system : lando
Changes:
This test is a permafail on ubuntu1804, and should be marked as such as the migration to ubunt1804 is actively underway with target date of end of December 2019.
With a fail-if annotation, the hope is that if this test suddenly begins passing we will be notified of it (as opposed to skipping it outright).
Differential Revision: https://phabricator.services.mozilla.com/D57381
--HG--
extra : moz-landing-system : lando
Not having a copy-assignment operator is a massive footgun (as it won't call the
right constructors / destructors). :(
Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1604075 for an analysis that
would've caught this.
One of my WIP patches adding a heap allocation to LengthPercentage caught this.
While at it, add non-const versions of the arrow and deref operators and fix
operator!= too (which doesn't compile, but we don't use it so C++'s template
madness says it's just fine).
Differential Revision: https://phabricator.services.mozilla.com/D57257
--HG--
extra : moz-landing-system : lando
In this way, we can avoid duplicates in FlexItem's normal constructor
and 'strut' constructor.
Differential Revision: https://phabricator.services.mozilla.com/D55821
--HG--
extra : moz-landing-system : lando
Changes:
With permission from the feature owner, this test is marked with a permissive fuzzy-if on ubuntu1804.
Once ubuntu1804 migration is complete, the annotation should be tightened to restrictive.
Differential Revision: https://phabricator.services.mozilla.com/D55552
--HG--
extra : moz-landing-system : lando
Merely checking for having a displayport isn't enough, because the paint to
tell APZ about the new scroll frame could still be pending.
Differential Revision: https://phabricator.services.mozilla.com/D56662
--HG--
extra : moz-landing-system : lando
Changes:
With acknowledgement from the test owner, add a permissive `fuzzy-if` annotation for the test such that ubuntu1804 no longer reports a failure, but the test continues running as intended on ubuntu1604.
Once the migration to ubuntu1804 is complete, the annotation is to be changed to a permanent `fails-if` due to the large pixel variation.
Differential Revision: https://phabricator.services.mozilla.com/D55554
--HG--
extra : moz-landing-system : lando
Changes:
Annotate the reftest failure on ubuntu1804 with a permissive `fuzzy-if` annotation designed to work with both ubuntu1604 and ubuntu1804.
Once the switchover to ubuntu1804 takes place, tighten the pixel range such that future failures can be caught.
Differential Revision: https://phabricator.services.mozilla.com/D55030
--HG--
extra : moz-landing-system : lando
Changes:
Insert permissive `fuzzy-if` annotation to the test to accommodate ubuntu1804 where the test fails due to large pixel difference.
Once the migration completes the pixel difference value will be tightened.
Differential Revision: https://phabricator.services.mozilla.com/D57229
--HG--
extra : moz-landing-system : lando
Changes:
Insert a permissive `fuzzy-if` to accommodate ubuntu1804 where the test fails due to large pixel difference.
Once ubuntu1804 migration completes, tighten the annotation to a restrictive one.
Differential Revision: https://phabricator.services.mozilla.com/D57228
--HG--
extra : moz-landing-system : lando
Changes:
Insert a permissive `fuzzy-if` for the `number-selected.html` test to accommodate ubuntu1804 where the test fails due to large pixel difference.
Once the migration to ubuntu1804 is complete, the permissive range will be tightened such that future deviations can be caught.
Differential Revision: https://phabricator.services.mozilla.com/D57227
--HG--
extra : moz-landing-system : lando
These reftests can be safely removed because all css-namespace tests are
pass in both received/reftest.list and wpt reftests (no
testing/web-platform/meta/css/css-namespaces folder).
The only manual modification in this patch are removing
`os.path.join("css-namespaces"),` in import-tests.py.
Others parts are generated by running import-tests.py on a wpt
repository with commit 15f199c91a72b0d51bf0a12b3b77827ecb5051ff.
Depends on D56376
Differential Revision: https://phabricator.services.mozilla.com/D56377
--HG--
extra : moz-landing-system : lando
When executing `./import-tests.py` in a python virtualenv, the path of
the python interpreter won't be at /usr/bin/python. By using
`/usr/bin/env python`, it works as the system can find a python
interpreter in $PATH.
Differential Revision: https://phabricator.services.mozilla.com/D56376
--HG--
extra : moz-landing-system : lando
While it calls `RestyleManager::ContentStateChanged()`, it blocks script
with `nsAutoCauseReflowNotifier`. Therefore, it should be marked as
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` at least (looks like the other override,
`DocAccessible::ContentStateChanged()` does not run script).
There is a concern about the lifetime of `RestyleManager`. It's destroyed
when `nsPresContext::DetachPresShell()` is called. It's called by
`PresShell::Destroy()` and destructor of `nsPresContext`. The latter is
safe since `PresShell` owns `mPresContext` and it's never cleared. However,
I'm not sure about the former. It might be better to create blocker of
synchronous handling of `PresShell::Destroy()`.
And also this does not make `Document::ContentStateChanged()` use
`RefPtr<PresShell>` at calling it because it might cause performance
regression, but it does not do anything after destroying
`nsAutoCauseReflowNotifier`.
Finally, for guaranteeing that the lifetime of `PresShell::mPresContext` is
longer than `PresShell`, this makes it to `RefPtr<nsPresContext> const`.
However, initializing it in constructor breaks other objects' initialization
process since they assume that `PresShell::GetPresContext()` won't return
valid pointer until the `nsPresContext` is attached. For solving this issue
safe, this patch keeps setting `mPresContext` in `Init()` with `const_cast`
hack.
Differential Revision: https://phabricator.services.mozilla.com/D55804
--HG--
extra : moz-landing-system : lando
foo ? true : false
or:
foo ? false : true
Have always a nicer way to be written.
Differential Revision: https://phabricator.services.mozilla.com/D56842
--HG--
extra : moz-landing-system : lando