This will make it easier for new tests to get a handle on a RefTest instance so
they can do a wider variety of unittesting.
Depends on D14300
Differential Revision: https://phabricator.services.mozilla.com/D14301
--HG--
extra : moz-landing-system : lando
This was a regression from bug 1497339 which changed the location of
specialpowers in the objdir. While the reftest harness itself was changed, the
selftests weren't updated.
Only the local case was affected since the location of specialpowers in the
tests.zip remained the same. This explains why this wasn't caught in CI.
Differential Revision: https://phabricator.services.mozilla.com/D14300
--HG--
extra : moz-landing-system : lando
The main style of <table> is set on the inner TableFrame, not the outer
TableWrapperFrame. Thus, we fail to spot the table as a column-span kid
in nsCSSFrameConstructor::ConstructionBlock().
Differential Revision: https://phabricator.services.mozilla.com/D13957
--HG--
extra : moz-landing-system : lando
This patch does not change behavior - it's purely an optimization to some
existing logic.
Differential Revision: https://phabricator.services.mozilla.com/D13132
--HG--
extra : moz-landing-system : lando
As in the previous commit, this avoids a redundant walk through the list of
frame properties, when we already know the property is not there.
Depends on D14223
Differential Revision: https://phabricator.services.mozilla.com/D14224
--HG--
extra : moz-landing-system : lando
As in the previous commit, this avoids a redundant walk through the list of
frame properties, when we already know the property is not there.
Depends on D14222
Differential Revision: https://phabricator.services.mozilla.com/D14223
--HG--
extra : moz-landing-system : lando
Previously we were using SetProperty, which does a redundant walk through the
property list to see whether the property already exists. This was unnecessary
because we only invoke it in the scenario when the property wasn't set.
So, we can use AddProperty to simply append and skip the redundant walk. And to
be extra-sure that the frame property is not present, this patch makes us use
the stricter 'found' outparam that our GetProperty() API provides (to
differentiate between no-result vs. a null value being intentionally stored
[unexpected but theoretically possible, & now checked for via MOZ_ASSERT].)
Depends on D14221
Differential Revision: https://phabricator.services.mozilla.com/D14222
--HG--
extra : moz-landing-system : lando
Previously we were providing a hand-coded destructor for this type, but this
was unnecessary, because the default one (invoked by 'delete') will do the same
thing.
Differential Revision: https://phabricator.services.mozilla.com/D14221
--HG--
extra : moz-landing-system : lando
This patch shouldn't affect behavior; it's just making the existing control
flow clearer and more debuggable.
Differential Revision: https://phabricator.services.mozilla.com/D14216
--HG--
extra : moz-landing-system : lando
When popping a dirty root, take the shallowest one first (so we reflow from
outer frames first, to avoid potential duplicate reflow of inner frames).
Prevent duplicate roots (to be reworked in a future bug).
Differential Revision: https://phabricator.services.mozilla.com/D9490
--HG--
extra : moz-landing-system : lando
As mDirtyRoots will be accessed through a more cohesive API, this patch hides
the storage details (nsTArray) -- but provides almost the same API for now.
Differential Revision: https://phabricator.services.mozilla.com/D9489
--HG--
extra : moz-landing-system : lando
We need to do the same thing what we did for opacity display items in bug 1395151.
Differential Revision: https://phabricator.services.mozilla.com/D14051
--HG--
extra : moz-landing-system : lando
Bug 1505887 changed the behavior here from content calling into nsFind via
window.find(), by making the SetStart and SetEnd calls here fail instead of
succeed for NAC (like the text in textareas).
This patch makes us handle that error gracefully moving on to the next match,
instead of trying to preserve the previous behavior.
This means that we'll fail to highlight textarea content and such from
window.find, which Chromium does, looks like. Though Chromium doesn't expose
the ranges as selection either. In any case I don't think that this is a very
common thing given bugs like bug 1442466, which this bug fixes.
I haven't found anything close to a spec for what window.find() should do... If
we decide to go with this patch then I'll add a crashtest for this and a test
for bug 1442466 as well. Otherwise I'll add a way to skip the security check in
nsFind somehow for NAC, or relax the security restrictions in SetStart /
SetEnd, I guess.
Differential Revision: https://phabricator.services.mozilla.com/D14013
--HG--
extra : moz-landing-system : lando
https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle says:
> If elt is connected, part of the flat tree, and its shadow-including root...
WebKit and Blink already do this, and we do it already except for cross-document
situations, where we can end up with a PresShell even if GetPresShellForContent
returns null.
The style system should be able to rely on ShadowRoots having a non-null shadow
host.
Differential Revision: https://phabricator.services.mozilla.com/D13472
https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle says:
> If elt is connected, part of the flat tree, and its shadow-including root...
WebKit and Blink already do this, and we do it already except for cross-document
situations, where we can end up with a PresShell even if GetPresShellForContent
returns null.
The style system should be able to rely on ShadowRoots having a non-null shadow
host.
Differential Revision: https://phabricator.services.mozilla.com/D13472
https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle says:
> If elt is connected, part of the flat tree, and its shadow-including root...
WebKit and Blink already do this, and we do it already except for cross-document
situations, where we can end up with a PresShell even if GetPresShellForContent
returns null.
The style system should be able to rely on ShadowRoots having a non-null shadow
host.
Differential Revision: https://phabricator.services.mozilla.com/D13472
This is needed because content-language can affect the default
computed values for a given document.
Differential Revision: https://phabricator.services.mozilla.com/D13636
--HG--
extra : moz-landing-system : lando
All of the removed includes are redundant (i.e. they're #included elsewhere in
the same file).
In most cases, I'm removing the second (redundant) copy of the
#include, except when that copy makes more sense (i.e. if it's in better sorted
order, or if it's paired alongside a closely-associated header while the
earlier copy is not).
Here's the script that I used to generate candidates here -- I ran this in
every subdirectory of layout, on my linux machine (warning, this writes two
files to your /tmp directory):
for FILE in *.h *.cpp; do
nonunique=$(grep \#include $FILE | grep -v List\.h | cut -f2 -d'"' | cut -f2- -d'/'| cut -f2- -d'/' | sort | wc -l)
unique=$( grep \#include $FILE | grep -v List\.h | cut -f2 -d'"' | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq | wc -l)
if [[ "$unique" != "$nonunique" ]]; then
echo "$FILE: $nonunique / $unique"
grep \#include $FILE | cut -f2 -d'"' | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort > /tmp/nonunique.txt
grep \#include $FILE | cut -f2 -d'"' | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq > /tmp/unique.txt
diff /tmp/nonunique.txt /tmp/unique.txt
echo
fi
done
Depends on D13773
Differential Revision: https://phabricator.services.mozilla.com/D13774
--HG--
extra : moz-landing-system : lando
(Also, include the full export path when including 'ImageLoader.h', for
consistency with how we include it everywhere else outside of its own
directory.)
Depends on D13743
Differential Revision: https://phabricator.services.mozilla.com/D13773
--HG--
extra : moz-landing-system : lando
I'm also adding the non-"inlines" version of the added "inlines" includes, too,
since it's nice to have them included as a pair. (It's not strictly necessary,
since in these cases we were already indirectly including the non-"inlines"
header, but it seems like a good practice.)
This patch fixes build warnings in non-unified builds for the following calls:
- The call to IsColumnSpan() in layout/generic/ColumnSetWrapperFrame.cpp
- The call to Type() in layout/style/MappedDeclarations.cpp
- The call to IsInAnonymousSubtree() in layout/svg/SVGObserverUtils.cpp
Differential Revision: https://phabricator.services.mozilla.com/D13743
--HG--
extra : moz-landing-system : lando
The tracking is done using nsAtom origins, similarly to how updates to the
scroll offset are tracked.
Currently, APZ still uses some heuristics to deduce that the main thread
originated a resolution change in some cases, but the intention is to try
to remove those and rely only on this mechanism in the future.
Differential Revision: https://phabricator.services.mozilla.com/D13741
--HG--
extra : moz-landing-system : lando
Without patch 1, this correctly triggers:
Assertion failure: !(bitsUsedPerGroup[group] & bit) (BULLET_FRAME_HAS_FONT_INFLATION must not use a bit already declared within its group), at /home/dbaron/builds/mozilla-central/mozilla/layout/generic/nsFrameStateBits.h:594
Differential Revision: https://phabricator.services.mozilla.com/D13779
--HG--
extra : moz-landing-system : lando
This causes a typedef mozilla::ServoElementSnapshot ServoElementSnapshot; to be
created, which we rely on bindgen not generating.
But bindgen will start (correctly) generating it in:
https://github.com/rust-lang/rust-bindgen/pull/1436
So easiest fix is just to remove this typedef, since it's just used by one FFI
function.
This causes a typedef mozilla::ServoElementSnapshot ServoElementSnapshot; to be
created, which we rely on bindgen not generating.
But bindgen will start (correctly) generating it in:
https://github.com/rust-lang/rust-bindgen/pull/1436
So easiest fix is just to remove this typedef, since it's just used by one FFI
function.
The fuzzy() annotation here is using the max-difference from the
Windows failures in bug 1452527, and the number-of-mismatching-pixels
from mac/linux failures in bug 1503525.
--HG--
extra : rebase_source : b7261f2f150ec609cec7c1f08e1fa7459994ddf3
The example frame tree didn't survive the global clang-format change.
DONTBUILD because this is a comment-only change.
Differential Revision: https://phabricator.services.mozilla.com/D13602
--HG--
extra : moz-landing-system : lando
The reftest in this commit fails without changing the default value. The test
image is shrunk too much.
Differential Revision: https://phabricator.services.mozilla.com/D13172
--HG--
extra : moz-landing-system : lando
I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.
Differential Revision: https://phabricator.services.mozilla.com/D12859
--HG--
extra : moz-landing-system : lando
This is all the style-system work needed for this.
This implements the concept of legacy shorthands, teaches tests to understand
it, and adds a few more tests for these properties in particular.
The WPT even caught a few WebKit / Blink bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=906336https://bugs.webkit.org/show_bug.cgi?id=191803
This doesn't change the layout behavior for page-break-before: always, since
it'd stop breaking in multicol and such. Similarly, break-before / break-after:
column and page still behave the same, I'll file followups for those given
comment 22.
Differential Revision: https://phabricator.services.mozilla.com/D12211
--HG--
extra : moz-landing-system : lando
This is consistent with what we do for non-stacking-contexts. The
GetCaretFrame() == child check may be able to go away, I'm not sure, so I've
left it for now.
Differential Revision: https://phabricator.services.mozilla.com/D13384
--HG--
extra : moz-landing-system : lando
Adds an |UpdateType| parameter to UpdateResolution() to better separate the
pre-reflow and post-reflow logic.
Differential Revision: https://phabricator.services.mozilla.com/D13314
--HG--
extra : moz-landing-system : lando
* Call SetResolutionAndScaleTo() in just one place
* Call UpdateVisualViewportSize() in UpdateResolution() rather than
requiring the caller to do it (and on non-first paints, only call it
if the resolution has actually changed)
Differential Revision: https://phabricator.services.mozilla.com/D13313
--HG--
extra : moz-landing-system : lando
* Introduce helpers for converting between zoom and resolution
* Perform calculations in terms of zoom rather than resolution
Differential Revision: https://phabricator.services.mozilla.com/D13312
--HG--
extra : moz-landing-system : lando
nsFrameSelection::CommonPageMove() is called only by
nsTextInputSelectionImpl::PageMove() and PresShell::PageMove(). So, this is
the only implementation of (Shift+) PageDown and (Shift+) PageUp.
This scrolls down/up the specific frame. However, this allows to scroll
outside of selection limiter, for example, even when an editing host is
focused, its parent scrollable element may be scrolled. This is same behavior
as Blink so that we should keep this behavior.
However, it also emulates to click same position after scroll and this behavior
is different from Blink. At this time, it does not check selection limiter and
then, nsFrameSelection::HandleClick() may reset selection limiter the scrolled
frame is a parent frame of the limiter.
Therefore, this patch makes it check if the scrolled frame is a parent of the
limiter, and if so, use result of GetFrameToPageSelect() to emulate a click
instead. The result won't be a parent of the limiter because it is used when
handling Shift + PageDown and Shift + PageUp which are always handled in the
limiter.
Differential Revision: https://phabricator.services.mozilla.com/D13202
--HG--
extra : moz-landing-system : lando
Even if there is no scrollable element is in focused editing host, its parent
scrollable element should be scrolled. However, focus shouldn't be moved and
selection ranges should be kept in the editing host.
Differential Revision: https://phabricator.services.mozilla.com/D13201
--HG--
extra : moz-landing-system : lando
The reftest in this commit fails without changing the default value. The test
image is shrunk too much.
Differential Revision: https://phabricator.services.mozilla.com/D13172
--HG--
extra : moz-landing-system : lando